Exception: Mistri::ResponseTooLargeError

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

Overview

An inbound body or protocol record crossed its configured byte boundary.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(kind:, limit:) ⇒ ResponseTooLargeError

Returns a new instance of ResponseTooLargeError.



68
69
70
71
72
73
# File 'lib/mistri/errors.rb', line 68

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

Instance Attribute Details

#kindObject (readonly)

Returns the value of attribute kind.



66
67
68
# File 'lib/mistri/errors.rb', line 66

def kind
  @kind
end

#limitObject (readonly)

Returns the value of attribute limit.



66
67
68
# File 'lib/mistri/errors.rb', line 66

def limit
  @limit
end