Skip to main content

ErrorLog

Error log entry DocType.

Stores information about system errors for debugging.
Errors are captured by the global exception handler.

Attributes:
title: Short description of the error
error_type: Exception class name (e.g., "ValueError")
error_message: Full error message
traceback: Stack trace for debugging
request_url: URL that triggered the error
user_id: User who triggered the error
request_id: Request ID for correlation
timestamp: When the error occurred
context: Additional context (headers, params, etc.)

Example:
log = ErrorLog(
title="Validation failed",
error_type="ValidationError",
error_message="Field 'email' is invalid",
)

Source: error_log.py

Fields

FieldTypeRequiredDescriptionValidators
titlestrShort description of the errormaxLen: 255
error_typestrException class name (e.g., ValueError)-
error_messagestrFull error message-
tracebackstrNoneFull stack trace for debugging
request_urlstrNoneURL that triggered the error
user_idstrNoneUser who triggered the error
request_idstrNoneRequest ID for log correlation
timestampdatetimeWhen the error occurred (UTC)-
contextdict[str, Any]NoneAdditional context: headers, params, etc.

Permissions

RoleCreateDeleteReadWrite
System Manager

Configuration

SettingValue
SubmittableFalse
Track ChangesTrue

Controller

Controller hooks are implemented in *_controller.py files. Available lifecycle hooks:

  • validate() - Called before save, raise exceptions for validation errors
  • before_insert() - Called before inserting a new document
  • after_insert() - Called after successfully inserting
  • before_save() - Called before saving (insert or update)
  • after_save() - Called after saving
  • before_delete() - Called before deleting
  • after_delete() - Called after deleting