antikythera v0.2.0 Antikythera.GearApplication.ErrorHandler View Source
Helper module for gear’s custom error handler.
To customize HTTP responses returned on errors, gear must implement an error handler module which
- is named
YourGear.Controller.Error
, and defines the following functions:
Mandatory error handlers
error/2
no_route/1
bad_request/1
Optional error handlers (when your gear uses websocket)
ws_too_many_connections/1
This module generates YourGear.error_handler_module/0
function, which is called by antikythera when handling errors.