Edit page in Livemark
(2024-12-13 12:49)

Error Class

The Error class is a metadata with no behavior. It's used to describe an error that happened during Framework work or during the validation.

To create a custom error you basically just need to fill the required class fields:

from frictionless import errors

class DuplicateRowError(errors.RowError):
    code = "duplicate-row"
    name = "Duplicate Row"
    tags = ["#table", "#row", "#duplicate"]
    template = "Row at position {rowPosition} is duplicated: {note}"
    description = "The row is duplicated."

Reference

Error (class)

Error (class)

Error representation. It is a baseclass from which other subclasses of errors are inherited or derived from.

Signature

(*, note: str) -> None

Parameters

  • note (str)

error.type (property)

A human readable informative comprehensive description of the error. It can be set to any custom text. If not set, default description is more comprehensive with error type, message and reasons included.

Signature

ClassVar[str]

error.title (property)

A human readable informative comprehensive description of the error. It can be set to any custom text. If not set, default description is more comprehensive with error type, message and reasons included.

Signature

ClassVar[str]

error.description (property)

A human readable informative comprehensive description of the error. It can be set to any custom text. If not set, default description is more comprehensive with error type, message and reasons included.

Signature

ClassVar[str]

error.template (property)

A human readable informative comprehensive description of the error. It can be set to any custom text. If not set, default description is more comprehensive with error type, message and reasons included.

Signature

ClassVar[str]

error.tags (property)

A human readable informative comprehensive description of the error. It can be set to any custom text. If not set, default description is more comprehensive with error type, message and reasons included.

Signature

ClassVar[List[str]]

error.message (property)

A human readable informative comprehensive description of the error. It can be set to any custom text. If not set, default description is more comprehensive with error type, message and reasons included.

Signature

str

error.note (property)

A short human readable description of the error. It can be set to any custom text.

Signature

str