Class: ErrorHandler
- Inherits:
-
RubyPitaya::HandlerBase
- Object
- RubyPitaya::HandlerBase
- ErrorHandler
- Defined in:
- lib/rubypitaya/app-template/app/handlers/error_handler.rb
Instance Attribute Summary
Attributes inherited from RubyPitaya::HandlerBase
#config, #log, #objects, #params, #postman, #services, #session, #setup
Instance Method Summary collapse
Methods inherited from RubyPitaya::HandlerBase
authenticated_action_name?, #initialize, non_authenticated_actions, objects, #set_attributes
Constructor Details
This class inherits a constructor from RubyPitaya::HandlerBase
Instance Method Details
#getError ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/rubypitaya/app-template/app/handlers/error_handler.rb', line 5 def getError error_code = RubyPitaya::StatusCodes::CODE_ERROR = "Some Error" raise RubyPitaya::RouteError.new(error_code, ) response = { code: StatusCodes::CODE_OK, data: { message: 'Ok!' } } end |