Module: Core::Service::ErrorHandling::Helpers
- Defined in:
- app/api/core/service/error_handling.rb
Defined Under Namespace
Classes: JsonError
Instance Method Summary collapse
- #content_error(code, errors = nil) ⇒ Object
- #exception_thrown ⇒ Object
- #general_error(code, errors = nil) ⇒ Object
Instance Method Details
#content_error(code, errors = nil) ⇒ Object
47 48 49 |
# File 'app/api/core/service/error_handling.rb', line 47 def content_error(code, errors = nil) error(code, JsonError.new(content: errors)) end |
#exception_thrown ⇒ Object
37 38 39 |
# File 'app/api/core/service/error_handling.rb', line 37 def exception_thrown @env['sinatra.error'] end |