Exception: OpenReceive::Server::MethodNotAllowedError

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

Overview

405 — a known OpenReceive path called with the wrong HTTP method. Mirrors the JS router exactly: INVALID_REQUEST, no Allow header.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = "This OpenReceive route does not support that HTTP method.") ⇒ MethodNotAllowedError

Returns a new instance of MethodNotAllowedError.



73
74
75
76
77
# File 'lib/openreceive/server/errors.rb', line 73

def initialize(message = "This OpenReceive route does not support that HTTP method.")
  super(message)
  @status = 405
  @code = "INVALID_REQUEST"
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



71
72
73
# File 'lib/openreceive/server/errors.rb', line 71

def code
  @code
end

#statusObject (readonly)

Returns the value of attribute status.



71
72
73
# File 'lib/openreceive/server/errors.rb', line 71

def status
  @status
end