Class: JSONRPC::ErrorResponse

Inherits:
SmartCore::ValueObject
  • Object
show all
Defined in:
lib/jsonrpc/error_response.rb

Overview

Since:

  • 0.1.0

Constant Summary collapse

ErrorSchema =

Returns:

  • (SmartCore::Schema)

Since:

  • 0.1.0

Class.new(SmartCore::Schema) do
  schema do
    required(:code).type(:integer).filled
    required(:message).type(:string).filled
    required(:data).type(:hash).filled
  end
end.new

Instance Method Summary collapse

Instance Method Details

#error?Boolean

Returns:

  • (Boolean)

Since:

  • 0.1.0



40
# File 'lib/jsonrpc/error_response.rb', line 40

def error? = true

#success?Boolean

Returns:

  • (Boolean)

Since:

  • 0.1.0



46
# File 'lib/jsonrpc/error_response.rb', line 46

def success? = false