code: def from_response(response):
          
          if response.code:
              return ERRORS[response.code](response)
          else:
              return Error(response)
docs: Returns the correct error type from a ::class::`Response` object.