BlocksConsole & Logging
Error Log
Log a custom error to the project's error log and console.
The Error Log block is used to record specific error events in the project's persistent error log. Unlike a regular console log, these entries are categorized as errors and can include additional context, making them easier to track in production environments.
Configuration
| Field | Required | Description |
|---|---|---|
| Message | ✅ | The error message to record. Supports variables. |
| Field | — | An additional label or category for the error (e.g., "Database", "Auth"). Defaults to "Custom Log" if left empty. |
Production Error Tracking
Use this block to catch and log expected failure cases in your logic, such as failed external API calls or invalid user input that doesn't fit standard validation.
Error Handling
USER_DEFINED_ERROR— This is the error key used for all entries created by this block in the error log.
Example
- Add an Error Log block after a block that might fail.
- Set Message to:
External API failed for user {user_id}. - Set Field to:
API_INTEGRATION. - When triggered, the error will appear in the Error Log section of your dashboard with the specified details.
