Exception: Jsapi::Controller::ResponseNotFound

Inherits:
StandardError
  • Object
show all
Defined in:
lib/jsapi/controller/methods.rb

Overview

Raised when no suitable response could be found.

Instance Method Summary collapse

Constructor Details

#initialize(operation, status) ⇒ ResponseNotFound

Returns a new instance of ResponseNotFound.



16
17
18
19
20
21
22
23
24
# File 'lib/jsapi/controller/methods.rb', line 16

def initialize(operation, status)
  super(
    if operation.responses.none?
      "#{operation.name.inspect} has no responses"
    else
      "#{operation.name.inspect} has no response for status #{status}"
    end
  )
end