{% match kind %}{% when Kind::NotFound %}Not found {% else %} Cot failure{% endmatch %}

{% match kind %}{% when Kind::NotFound %}The URL requested could not be found.{% when Kind::Panic %}The request handler has panicked. {% else %} An error occurred while handling a request.{% endmatch %}

{% match kind %} {% when Kind::Panic %}

Panic data

{% match panic_string %}{% when Some with (panic_string) %}
{{ panic_string }}
{% else %} Panic payload unavailable or not a string.{% endmatch %} {% match panic_location %}{% when Some with (panic_location) %}

at {{ panic_location }}

{% else %} {% endmatch %} {% else %} {% endmatch %} {% if let Some(error_message) = error_message %}

Error message

{{ error_message }}
{% endif %} {% if !error_data.is_empty() -%}

Error chain

{% for error in error_data %} {% endfor %}
# Description Structure
{{ loop.index0 }} {{ error.description }} {% if error.is_cot_error %}cot::Error{% endif %}
{{ error.debug_str }}
{%- endif %} {% if kind == Kind::Error || kind == Kind::Panic -%}

Backtrace

{% match backtrace -%} {% when Some with (backtrace) %}
{% for frame in backtrace.frames() %}
{{ loop.index0 }}:
{{ frame.symbol_name() }}
at {{ frame.location() }}
{% endfor %}
{% else -%}

Backtrace unavailable.

{%- endmatch %} {% endif %}

Diagnostics

Routes

{% for route in route_data %} {% endfor %}
# URL Type Name
{{ route.index }} {% if route.path.is_empty() %} <empty> {% else %} {{ route.path }} {% endif %} {{ route.kind }} {% if route.name.is_empty() %} <none> {% else %} {{ route.name }} {% endif %}
{% match request_data -%} {% when Some with (request_data) -%}

Request

Method

{{ request_data.method }}

URL

{{ request_data.url }}

Protocol version

{{ request_data.protocol_version }}

Headers

{% for (header, value) in request_data.headers %} {% endfor %}
Header Value
{{ header }} {{ value }}
{% when None -%} {%- endmatch %}

Project Config

{{ project_config }}