CorefinityCorefinityDocs
Open the Control PanelControl Panel
Error pages · 2 of 8

corestack_error_pages_preview

Preview an error page.

Scope readNo secrets returned
On this page

When to use it

See one error or maintenance page as visitors would get it, before saving anything. The page is compiled by the same compiler that writes the site's files, so the HTML in the answer is what the site would serve, with sample values for the per-request tags.

Leave source out to preview the saved page, send your HTML to preview a draft, or send null for the platform's own page. message works the same way for the {{message}} text.

The answer is {html, diagnostics, bytes, samples}. Pages are HTML and CSS only: anything a page may not hold (scripts, event handlers, javascript: and other links that are not https:, mailto: or images, iframes, forms) is removed when you save, and each removal is listed here first as a warning whose code starts with removed_, with its line and column. A diagnostic with severity error blocks the save: an unknown tag, a tag inside a link or CSS, <!--#, or a page over 64 KiB.

Tags: {{status_code}}, {{status_text}}, {{message}}, {{site_name}}, {{support_email}}, {{retry_after}}, and per request {{host}}, {{request_id}}, {{time_utc}}. Every value is HTML-escaped.

Ask for it

Prompt
Using the Corefinity MCP server, call corestack_error_pages_preview with site_id 4211, page maintenance, source <!DOCTYPE html>
<html lang="en">
<head><meta charset="utf-8"><title>{{status_text}}</title></head>
<body><h1>{{site_name}} is being updated</h1><p>{{message}}</p><p><small>Reference: {{request_id}}</small></p></body>
</html>
. (Preview an error page.) Tell me what it returned.

Inputs

messagestring or null

The {{message}} text. Left out: the saved one. Null: the default. Up to 300 characters.

pagestringRequired

The page: maintenance, 404, 500, 502, 503 or 504.

maintenance404500502503504
sampleobject

Values for host, request_id and time_utc in the preview.

Fields
hoststring

Up to 253 characters.

request_idstring

Up to 64 characters.

time_utcstring

Up to 40 characters.

site_idintegerRequired

The environment row. At least 1.

sourcestring or null

The HTML to preview. Left out: the saved page. Null: the platform's page. Up to 65,536 characters.

Example call

tools/call
{
  "name": "corestack_error_pages_preview",
  "arguments": {
    "site_id": 4211,
    "page": "maintenance",
    "source": "<!DOCTYPE html>\n<html lang=\"en\">\n<head><meta charset=\"utf-8\"><title>{{status_text}}</title></head>\n<body><h1>{{site_name}} is being updated</h1><p>{{message}}</p><p><small>Reference: {{request_id}}</small></p></body>\n</html>\n"
  }
}

If it is refused

ReasonWhat to do
feature_offError pages are not available to you yet.
managed_elsewhereAnother control panel manages this site, so use that control panel for it. This is refused before anything else about the site, as in the Control Panel and the API. Nothing was done.
invalid_argumentsThe arguments do not match the tool's input schema, or the Control Panel refused a field. Fix the fields named in the answer and call again.
tenant_mismatchThe object does not exist or the token may not see it. Check the id.
scope_requiredThe token lacks a scope this call needs. Open the link in the answer to add it, then call again.
pin_refusedThe grant is limited to chosen clusters, sites or environments, and this call is outside them. Open the link in the answer to widen it.
rate_limitedToo many calls. Wait for the number of seconds the answer names.
temporarily_unavailableThe Control Panel could not answer just now. Nothing was started; try again shortly.
internal_errorSomething went wrong on our side. Quote the trace id to support.

The same task elsewhere

Was this helpful?
Open in ClaudeOpen in ChatGPT