lib/gitlab/request.rb in gitlab-4.18.0 vs lib/gitlab/request.rb in gitlab-4.19.0

- old
+ new

@@ -65,10 +65,10 @@ end # Checks the response code for common errors. # Returns parsed response for successful requests. def validate(response) - error_klass = Error::STATUS_MAPPINGS[response.code] + error_klass = Error.klass(response) raise error_klass, response if error_klass parsed = response.parsed_response parsed.client = self if parsed.respond_to?(:client=) parsed.parse_headers!(response.headers) if parsed.respond_to?(:parse_headers!)