{% if data.has_exception %} {% set exc = data.exception %}

{% if exc.get('is_framefox_exception', false) %} Framefox Exception {% else %} System Exception {% endif %} {{ exc.get('class', 'Unknown') }}

[{{ exc.get('code', 'UNKNOWN') }}] {{ exc.get('message', 'No message available') }}

🚨 Error Details

{{ exc.get('class', 'Unknown') }}: {{ exc.get('message', 'No message available') }}
{% if exc.get('context') and exc.context|length > 0 %}

💡 Context & Solutions

{% if exc.context.get('suggestion') %}

Quick Solution

  • {{ exc.context.suggestion }}
{% endif %} {% if exc.context.get('fix_command') %}

Fix Command

  • Run this command: {{ exc.context.fix_command }}
{% endif %} {% if exc.context.get('table_name') %} {% endif %} {% if exc.context.get('constraint') %} {% endif %} {% if exc.context.get('field') %} {% endif %} {% if exc.context.get('template_name') %} {% endif %} {% if exc.context.get('error_details') %} {% endif %} {% if exc.context.get('resource') %} {% endif %} {% if exc.context.get('token_type') %} {% endif %} {% if exc.context.get('filename') %} {% endif %} {% if exc.context.get('operation') %} {% endif %} {% if exc.context.get('rate_limit') %} {% endif %} {% if exc.context.get('status_code') %} {% endif %} {% if exc.context.get('error_count') %} {% endif %}
Missing Table {{ exc.context.table_name }}
Database Constraint {{ exc.context.constraint }}
Invalid Field {{ exc.context.field }} {% if exc.context.get('validation_message') %}
{{ exc.context.validation_message }} {% endif %} {% if exc.context.get('invalid_value') %}
Value: {{ exc.context.invalid_value }} {% endif %}
Template {{ exc.context.template_name }}
Error Details {{ exc.context.error_details }}
Resource {{ exc.context.resource }} {% if exc.context.get('action') %}
Action: {{ exc.context.action }} {% endif %}
Token Type {{ exc.context.token_type }}
File {{ exc.context.filename }} {% if exc.context.get('upload_reason') %}
Reason: {{ exc.context.upload_reason }} {% endif %} {% if exc.context.get('actual_size') and exc.context.get('max_size') %}
Size: {{ exc.context.actual_size }} bytes (max: {{ exc.context.max_size }} bytes) {% endif %}
Operation {{ exc.context.operation }} {% if exc.context.get('timeout_seconds') %}
Timeout: {{ exc.context.timeout_seconds }} seconds {% endif %}
Rate Limit {{ exc.context.rate_limit }} requests {% if exc.context.get('time_window') %} per {{ exc.context.time_window }} {% endif %}
HTTP Status {{ exc.context.status_code }}
Total Errors {{ exc.context.error_count }}
{% if exc.context.get('validation_errors') %}

🔍 Validation Errors

{% for field, errors in exc.context.validation_errors.items() %} {% endfor %}
{{ field }}
    {% for error in errors %}
  • {{ error }}
  • {% endfor %}
{% endif %}
{% endif %}

🌐 Location Information

{% if exc.get('line') and exc.line != 0 %} {% endif %}
File {% if exc.get('file') and exc.file != 'Unknown' %} {% set file_path = exc.file %} {% if '/' in file_path %} {{ file_path.split('/')[-1] }} {% else %} {{ file_path }} {% endif %} {% else %} Unknown {% endif %}
Line {{ exc.line }}
Exception Type {% if exc.get('is_framefox_exception', false) %} Framefox Exception {% else %} System Exception {% endif %}
Category {{ exc.get('category', 'general').title() }}
{% if data.get('is_python_exception', false) and exc.get('trace') %}

🔍 Stack Trace

{{ exc.trace }}
{% endif %} {% if exc.get('original_class') and exc.original_class != exc.get('class') %}

🔄 Original Exception

Original Type {{ exc.original_class }}
Original Message {{ exc.get('original_message', 'No original message') }}
Transformed To {{ exc.get('class', 'Unknown') }}
{% endif %} {% else %}

✅ No Exceptions

No exceptions occurred during this request.

{% endif %}