Exception: Mistri::ResponseTooComplexError

Inherits:
Error
  • Object
show all
Defined in:
lib/mistri/errors.rb

Overview

A JSON protocol record crossed a structural boundary before parsing.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(kind:, limit:) ⇒ ResponseTooComplexError

Returns a new instance of ResponseTooComplexError.



80
81
82
83
84
85
# File 'lib/mistri/errors.rb', line 80

def initialize(kind:, limit:)
  @kind = kind
  @limit = limit
  label = kind.to_s.tr("_", " ")
  super("#{label} exceeded the complexity limit (#{limit})")
end

Instance Attribute Details

#kindObject (readonly)

Returns the value of attribute kind.



78
79
80
# File 'lib/mistri/errors.rb', line 78

def kind
  @kind
end

#limitObject (readonly)

Returns the value of attribute limit.



78
79
80
# File 'lib/mistri/errors.rb', line 78

def limit
  @limit
end