Return an error code with requests