Catch nil error when REST server returns an empty array instead of a 404 error