Skip to main content

Custom Error Page

The CloudBase HTTP Gateway supports custom error pages. When a request returns a supported 4XX client error, the gateway returns a custom error page instead of the default one.

Availability

Custom error pages are currently only available for platform users.

Entry​

Go to CloudBase Console - Platform Settings - Custom Domain, and click "Configure Error Page" in the "Custom Error Page" area.

Configure an Error Page​

  1. Click "Configure Error Page".
  2. Select the error status codes to customize. Supported codes are 401, 402, 403, 404, 423, 429, and 451. See the table below for their scenarios and Semantic HTTP Status Codes for the related error codes.
  3. Upload your custom error page file. Supported formats: .html / .htm / .json / .xml, with a maximum size of 2 MB per file.
  4. After saving, error requests with the selected status codes will return your uploaded error page.
Status CodeScenario
401Authentication failed: missing, invalid, or expired credentials
402Overdue payment, plan limits exceeded, environment suspension, or resource isolation
403Insufficient permissions or access denied by a policy
404Resource, domain, or path does not exist
423Feature not enabled, route disabled, or domain not connected to the environment
429Rate, quota, or concurrency limits exceeded
451Blocking or compliance restrictions
Note
  • Custom error pages are returned for the selected 4XX client errors.
  • Only one error page can be configured per status code; if configured repeatedly, the most recently uploaded file takes effect.
  • 402 covers environment suspension: when an environment is suspended due to plan expiry isolation, exhausted resource points, or overdue payment, all requests to that environment return 402. You can use the error page to guide users to renew or enable pay-as-you-go overrun.

Managing Error Pages​

Once configured, the error page list shows the active configurations:

Column/ActionDescription
Status CodesStatus codes covered by this error page; selectable codes are 401, 402, 403, 404, 423, 429, and 451
Error Page FileThe uploaded custom error page file name, e.g., error-page-xxxx.html
EditModify the status code range or replace the error page file
PreviewView the error page. The dialog provides two tabs: Preview shows the actual rendered effect of the error page, and Page Content displays the source code of the error page file
DeleteDelete the configuration; the corresponding status codes fall back to the default error page
Tip

It is recommended to cover common status codes (e.g., 404, 403) and include guidance entries such as "Back to Home" or "Contact Support" on the error page to reduce user churn in error scenarios.