Class: GraphqlRails::Controller::HandleControllerError
- Inherits:
-
Object
- Object
- GraphqlRails::Controller::HandleControllerError
- Defined in:
- lib/graphql_rails/controller/handle_controller_error.rb
Overview
runs before/around/after_action controller hooks
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(error:, controller:) ⇒ HandleControllerError
constructor
A new instance of HandleControllerError.
Constructor Details
#initialize(error:, controller:) ⇒ HandleControllerError
Returns a new instance of HandleControllerError.
7 8 9 10 |
# File 'lib/graphql_rails/controller/handle_controller_error.rb', line 7 def initialize(error:, controller:) @error = error @controller = controller end |
Instance Method Details
#call ⇒ Object
12 13 14 15 16 |
# File 'lib/graphql_rails/controller/handle_controller_error.rb', line 12 def call return custom_handle_error if custom_handle_error? render_unhandled_error(error) end |