Exception: ErrorsHelper::BadRequest
- Defined in:
- lib/errors_helper/bad_request.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(code: '00', status: nil) ⇒ BadRequest
constructor
A new instance of BadRequest.
Methods inherited from Base
Constructor Details
#initialize(code: '00', status: nil) ⇒ BadRequest
Returns a new instance of BadRequest.
5 6 7 8 9 10 |
# File 'lib/errors_helper/bad_request.rb', line 5 def initialize(code: '00', status: nil) value = ErrorsHelper.build_response(code: code) super message: value[:message] || ErrorsHelper.build_response(code: '00')[:message], code: value[:code] || ErrorsHelper.build_response(code: '00')[:code], status: status || :bad_request end |