Class: ErrorsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ErrorsController
- Defined in:
- app/controllers/errors_controller.rb
Instance Method Summary collapse
-
#bad_request ⇒ Object
/400.
-
#forbidden ⇒ Object
/403.
-
#internal_server_error ⇒ Object
/500.
-
#not_found ⇒ Object
/404.
-
#unauthorized ⇒ Object
/401.
-
#unprocessable_entity ⇒ Object
422.
Instance Method Details
#bad_request ⇒ Object
/400
3 4 5 6 7 |
# File 'app/controllers/errors_controller.rb', line 3 def bad_request Metric.register(Metric::METRIC_HTTP_400) render :error, status: :bad_request end |
#forbidden ⇒ Object
/403
17 18 19 20 21 |
# File 'app/controllers/errors_controller.rb', line 17 def forbidden Metric.register(Metric::METRIC_HTTP_403) render :error, status: :forbidden end |
#internal_server_error ⇒ Object
/500
38 39 40 41 42 |
# File 'app/controllers/errors_controller.rb', line 38 def internal_server_error Metric.register(Metric::METRIC_HTTP_500) render :error, status: :internal_server_error end |
#not_found ⇒ Object
/404
24 25 26 27 28 |
# File 'app/controllers/errors_controller.rb', line 24 def not_found Metric.register(Metric::METRIC_HTTP_404) render :error, status: :not_found end |
#unauthorized ⇒ Object
/401
10 11 12 13 14 |
# File 'app/controllers/errors_controller.rb', line 10 def Metric.register(Metric::METRIC_HTTP_401) render :error, status: :unauthorized end |
#unprocessable_entity ⇒ Object
422
31 32 33 34 35 |
# File 'app/controllers/errors_controller.rb', line 31 def unprocessable_entity Metric.register(Metric::METRIC_HTTP_422) render :error, status: :unprocessable_entity end |