corestack_ error_ pages_ update
Change an environment's error pages.
When to use it
Change an environment's error and maintenance pages, with the version that corestack_error_pages_get answered. Check any new HTML with corestack_error_pages_validate (or corestack_error_pages_preview) first.
Send only what changes; everything you leave out keeps its current value:
codes: for 404, 500, 502, 503 and 504,pageshows the error page (ours, or your HTML) in place of the app's response, with the status code unchanged;applets the app's own response through. When nginx itself has to answer (PHP not running gives 502, a request over 300 seconds gives 504) there is no app response:pageshows the error page andappshows nginx's plain page.503also decides what happens during deploys and platform maintenance:pageshows the maintenance page,applets requests reach the app. The Maintenance switch in the Control Panel and a full stop by Corefinity support always show the maintenance page, whatever this setting.pages: formaintenance,404,500,502,503and504,sourceis your HTML and CSS (null puts the platform's page back) andmessageis the{{message}}text (null puts the default back).support_email: the{{support_email}}address; null clears it.
Pages are HTML and CSS only. The save removes anything a page may not hold (scripts, event handlers, links that are not https:, mailto: or images, iframes, forms) and keeps the page without it. When the app answers an API request (paths such as /rest/, /graphql, /wp-json/, or a request asking for JSON), its response always passes through; an error the web server answers itself on such a request (PHP not running, a request over 300 seconds) follows the settings.
The save is checked, written to the site and verified. The answer is a task on its error_pages_change operation (follow it with corestack_site_operation_get). The finished task's result carries error_pages: outcome is applied (the new pages are live and the site confirmed them), applied_unverified (live, but the site could not confirm them), rejected (the site refused the change and kept its previous pages; the task fails) or unknown (not known yet; it is checked again shortly). applied is true while the new pages are live, verified when the site confirmed them.
A change equal to the current pages answers {operation: null, revision: null}. After rejected or unknown, retry: true with the version applies the current pages again. 20 changes a minute for each environment, whoever sends them.
Ask for it
Using the Corefinity MCP server, call corestack_error_pages_update with site_id 4211, version 3, codes {"503":"app"}, note Show the shop's own holding page. (Change an environment's error pages.) Tell me what it returned.Inputs
404, 500, 502, 503, 504, each page or app.
Fields
pageapppageapppageapppageapppageappWhy, shown in the history. Up to 200 characters.
maintenance, 404, 500, 502, 503, 504, each {source?, message?}; source at most 64 KiB, message at most 300 characters, either null for the default.
Fields
Fields
Fields
Fields
Fields
Fields
Fields
True applies the current pages again after rejected or unknown. Send it with version and nothing to change.
The environment row. At least 1.
An email address. Up to 254 characters.
The version from corestack_error_pages_get; a newer change makes it stale. At least 0.
Example call
{
"name": "corestack_error_pages_update",
"arguments": {
"site_id": 4211,
"version": 3,
"codes": {
"503": "app"
},
"note": "Show the shop's own holding page"
}
}If it is refused
| Reason | What to do |
|---|---|
stale | Someone changed the pages since version was read. Read them again with corestack_error_pages_get. |
error_pages_locked | Corefinity has locked this environment's error pages. |
invalid_page | A page has an error the save cannot fix; nothing was saved. details.diagnostics lists each with its page, line and column. |
overlap_nginx_rules | The environment's nginx rules already set an error page for that code. Set the code to app, or remove the error_page line from the nginx rules first. |
too_large | A page is over 64 KiB, or all pages together over 256 KiB. |
runtime_lacks_capability | The environment gets error pages with its next platform update. |
operation_in_progress | A change is still being applied; try again when it ends. |
switch_reconcile_failed | The Maintenance switch could not be brought in line first; nothing was changed. Try again. |
managed_elsewhere | Another control panel manages this environment. |
feature_off | Error pages are not available to you yet. |
invalid_arguments | The 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_mismatch | The object does not exist or the token may not see it. Check the id. |
scope_required | The token lacks a scope this call needs. Open the link in the answer to add it, then call again. |
pin_refused | The 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_limited | Too many calls. Wait for the number of seconds the answer names. |
temporarily_unavailable | The Control Panel could not answer just now. Nothing was started; try again shortly. |
internal_error | Something went wrong on our side. Quote the trace id to support. |