module Gitlab::Error

def self.klass(response)

Returns:
  • (Class, nil) -

Parameters:
  • response (HTTParty::Response) -- The response object.
def self.klass(response)
  error_klass = STATUS_MAPPINGS[response.code]
  return error_klass if error_klass
  ResponseError if response.server_error? || response.client_error?
end