# `BeamExport.MappingError`
[🔗](https://github.com/HataluliRandima/beam_export/blob/v0.1.0/lib/beam_export/errors.ex#L1)

Raised (or returned) when the `:mapper` function fails for a record.

**Record contents are redacted by default.** Exceptions end up in logs, error
trackers and telemetry handlers, so BeamExport never puts row data there unless
you opt in with `include_record_in_errors: true` (for example in development).

Fields:

  * `:row` - the 1-based position of the failing record in the source
    (the header row is not counted).
  * `:reason` - `{:exception, module}` when the mapper raised, or
    `{:invalid_return, type}` when it returned something other than a list or tuple.
  * `:record` - the record, or `:redacted`.
  * `:detail` - a short description of the failure that is safe to log (for
    example `key :email not found`), or `nil`.
  * `:original_error` - the exception the mapper raised, or `:redacted`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
