{# What came back — the panel the console swaps after a call. It renders empty when there is no result, because the operation page includes it as the placeholder the reply replaces. An `{% if %}` here rather than two templates: the id has to exist in the document before the first call, and an empty div carrying it is cheaper than a second file that renders one. #} {% from "apidocs/macros.html" import facts %} {% from "ui/data.html" import badge, card, code_block %} {% from "ui/icon.html" import icon %} {% from "ui/layout.html" import stack %}
{{ icon("circle-alert", 16) }}{{ result.error }}
{# Where the rest of it is. An in-process replay has no server above it to log what escaped, so the console logs it itself, and saying so here is the difference between a one-line error and knowing there is a stack to go and read. Without this line the indirection is the liability it looks like. #}
The traceback is in this app's log, under fjkit_apidocs.console.
Truncated. The body was larger than this console will hold — call it with curl for the rest.
{% endif %} {% else %}Empty body.
{% endif %} {% if result.headers %} {{ code_block(result.headers | map("join", ": ") | join("\n"), label="Response headers") }} {% endif %} {% endif %} {% if curl %} {# The same call as a command. Credentials are placeholders, not values: a snippet built for copying ends up in a bug report, and the point of this plugin is that the session cookie is not readable from the page. #} {{ code_block(curl, label="The same call with curl", wrap=true) }} {% endif %} {% endcall %} {% endcall %}