Module: GraphitiErrors
- Defined in:
- lib/graphiti/error_serializers/deprecated_constants.rb
Overview
Only graphiti_errors' serializers survived the 2.0 merge. Remove in 3.0.
Defined Under Namespace
Modules: ConflictRequest, InvalidRequest, Serializers, Validation
Class Method Summary collapse
- .disable! ⇒ Object
- .disabled? ⇒ Boolean
- .enable! ⇒ Object
-
.included(klass) ⇒ Object
Including an empty module succeeds, so silence here means HTML error pages.
Class Method Details
.disable! ⇒ Object
23 24 25 26 |
# File 'lib/graphiti/error_serializers/deprecated_constants.rb', line 23 def disable! Graphiti::DEPRECATOR.deprecation_warning("GraphitiErrors.disable!", "wrap the request in Graphiti::Rails::TestHelpers#handle_request_exceptions instead") test_helpers.handle_request_exceptions(false) end |
.disabled? ⇒ Boolean
28 29 30 |
# File 'lib/graphiti/error_serializers/deprecated_constants.rb', line 28 def disabled? !test_helpers.handle_request_exceptions? end |
.enable! ⇒ Object
18 19 20 21 |
# File 'lib/graphiti/error_serializers/deprecated_constants.rb', line 18 def enable! Graphiti::DEPRECATOR.deprecation_warning("GraphitiErrors.enable!", "wrap the request in Graphiti::Rails::TestHelpers#handle_request_exceptions instead") test_helpers.handle_request_exceptions(true) end |
.included(klass) ⇒ Object
Including an empty module succeeds, so silence here means HTML error pages.
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/graphiti/error_serializers/deprecated_constants.rb', line 4 def self.included(klass) raise <<~MSG GraphitiErrors merged into graphiti in 2.0 and this include does nothing. Use: include Graphiti::Rails::Controller Your own exceptions register alongside Graphiti's with `register_exception`. `registered_exception?` is now `RescueRegistry.handles_exception?`, and `handle_exception` went with the rendering. See graphiti.dev/upgrading. MSG end |