View Source CsrfPlus.ErrorMapper behaviour (CsrfPlus v0.1.2)

Defines the behaviour for an ErrorModule while also defining a default map function.

Summary

Functions

Maps a CsrfPlus exception into a tuple with the status code and the error map.

Converts back a string representation of a module to an actual module name

Converts a module to string, but without the Elixir prefix.

Callbacks

@callback map(exception :: Exception.t()) ::
  {status_code :: atom() | integer(), error :: map()}

Functions

Maps a CsrfPlus exception into a tuple with the status code and the error map.

Link to this function

module_from_string(string)

View Source

Converts back a string representation of a module to an actual module name

Link to this function

module_to_string(module)

View Source

Converts a module to string, but without the Elixir prefix.