Exception: SemaphoreClient::Exceptions::UnprocessableEntity

Inherits:
ResponseError
  • Object
show all
Defined in:
lib/semaphore_client/exceptions.rb

Overview

422

Instance Attribute Summary

Attributes inherited from ResponseError

#env

Instance Method Summary collapse

Methods inherited from ResponseError

#body, #code, #initialize, #message

Constructor Details

This class inherits a constructor from SemaphoreClient::Exceptions::ResponseError

Instance Method Details

#errorsObject



48
49
50
51
52
# File 'lib/semaphore_client/exceptions.rb', line 48

def errors
  JSON.parse(@env[:body])["errors"].map do |error|
    ApiError.new(error["resource"], error["field"], error["code"])
  end
end