def check_for_errors(response) #:nodoc
      case response.status
        when 400 then raise HTTPRequestFailed, response.body
        when 403 then parse_403_error(response)
        when 404 then raise HTTPNotFound, response.body
        when 409 then raise RequestedIdentifierAlreadyExistsError, response.body
        when 410 then raise GoneError, response.body
        when 412 then raise PreconditionFailedError, response.body
        when 500 then raise BackendError, response.body
      end
    end
def check_for_errors(response) #:nodoc
      case response.status
        when 400 then raise HTTPRequestFailed, response.body
        when 403 then parse_403_error(response)
        when 404 then raise HTTPNotFound, response.body
        when 409 then raise RequestedIdentifierAlreadyExistsError, response.body
        when 410 then raise GoneError, response.body
        when 412 then raise PreconditionFailedError, response.body
        when 500 then raise BackendError, response.body
      end
    end
Check for common HTTP Errors and raise the appropriate response.
 Note: error 401 (InvalidCredentialsError) is handled by Signet.