Blunder.Absinthe v1.3.1 Blunder.Absinthe.ErrorHandler behaviour View Source

Behaviour for a module that handles Blunder errors in the Blunder.Absinthe middleware

Creating an error handler is as simple as this:

defmodule LogError do
  use Blunder.Absinthe.ErrorHandler
  require Logger

  @impl Blunder.Absinthe.ErrorHandler
  def call(blunder) do
    Logger.error blunder.message
  end

end

Then in your config…

config :blunder, error_handlers: [ LogError ]

Link to this section Summary

Link to this section Functions

Link to this function error_event(pid, blunder) View Source
error_event(pid :: pid(), blunder :: Blunder.t()) :: :ok

Link to this section Callbacks

Link to this callback call(arg0) View Source
call(Blunder.t()) :: :ok | {:error, any()}
Link to this callback call(arg0, any) View Source
call(Blunder.t(), any()) :: :ok | {:error, any()}