Exception: OpenReceive::Server::InternalHostError

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

Overview

500 INTERNAL raised deliberately (for example: the host resolved an order without an amount). Unlike an unexpected exception, the message is payer-safe by construction and stays on the wire — mirroring the JS handler's HttpError(500, "INTERNAL", ...).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = "Internal server error.") ⇒ InternalHostError

Returns a new instance of InternalHostError.



87
88
89
90
91
# File 'lib/openreceive/server/errors.rb', line 87

def initialize(message = "Internal server error.")
  super(message)
  @status = 500
  @code = "INTERNAL"
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



85
86
87
# File 'lib/openreceive/server/errors.rb', line 85

def code
  @code
end

#statusObject (readonly)

Returns the value of attribute status.



85
86
87
# File 'lib/openreceive/server/errors.rb', line 85

def status
  @status
end