EasyRpc.Plugs.ErrorHandler (EasyRpc v1.0.0)

Copy Markdown View Source

Normalises the context after execution.

  • When error_handling: true and the call succeeded, wraps result in {:ok, result}.
  • When error_handling: true and there is an error, wraps error in {:error, error}.
  • When error_handling: false and the call succeeded, leaves the raw result in place.
  • When error_handling: false and there is an error, the context passes through unchanged — the caller (e.g. RpcCall) decides whether to raise.