Faulty.Error (Faulty v0.1.7)

Copy Markdown View Source

Schema to store an error or exception recorded by Faulty.

It stores a kind, reason and source code location to generate a unique fingerprint that can be used to avoid duplicates.

The fingerprint includes a normalized version of the error reason to ensure proper grouping of similar errors while separating different error types. See Faulty.Fingerprint for the fingerprinting algorithm details.

Summary

Functions

Returns if the Error has information of the source or not.

Types

t()

@type t() :: %Faulty.Error{
  __meta__: term(),
  fingerprint: term(),
  id: term(),
  kind: term(),
  last_occurrence_at: term(),
  reason: term(),
  source_function: term(),
  source_line: term(),
  status: term()
}

Functions

has_source_info?(error)

Returns if the Error has information of the source or not.

Errors usually have information about in which line and function occurred, but in some cases (like an Oban job ending with {:error, any()}) we cannot get that information and no source is stored.