View Source LenraCommon.Errors.BusinessError exception (lenra_common v2.9.0)

LenraCommon.Errors.BusinessError creates all error functions based on the @errors list. For each error in the list, this module creates two function, one that creates and returns a BusinessError struct, the second that creates a BusinessError struct and returns it into a tuple.

Summary

Types

@type t() :: %LenraCommon.Errors.BusinessError{
  __exception__: term(),
  message: String.t(),
  metadata: any(),
  reason: atom(),
  status_code: integer()
}

Functions

Link to this function

forbidden(metadata \\ %{})

View Source
Link to this function

forbidden_tuple(metadata \\ %{})

View Source
Link to this function

integer_array_index(metadata \\ %{})

View Source
Link to this function

integer_array_index_tuple(metadata \\ %{})

View Source
Link to this function

nil_json(metadata \\ %{})

View Source
Link to this function

nil_json_tuple(metadata \\ %{})

View Source
Link to this function

unauthorized(metadata \\ %{})

View Source
Link to this function

unauthorized_tuple(metadata \\ %{})

View Source