Exception: OpenReceive::Server::PayloadTooLargeError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/openreceive/server/errors.rb

Overview

413 — contract bodies are tiny; anything larger is rejected before any host callback runs (mirrors the JS handler's pre-auth body cap).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = "Request body is too large.") ⇒ PayloadTooLargeError

Returns a new instance of PayloadTooLargeError.



114
115
116
117
118
# File 'lib/openreceive/server/errors.rb', line 114

def initialize(message = "Request body is too large.")
  super(message)
  @status = 413
  @code = "INVALID_REQUEST"
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



112
113
114
# File 'lib/openreceive/server/errors.rb', line 112

def code
  @code
end

#statusObject (readonly)

Returns the value of attribute status.



112
113
114
# File 'lib/openreceive/server/errors.rb', line 112

def status
  @status
end