你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

ErrorPage Class

A custom error page for a specific status returned by a web app.

Constructor

ErrorPage(*, status_code: int | None = None, content: str | None = None, content_type: str | None = None, always_use: bool | None = None, **kwargs: Any)

Keyword-Only Parameters

Name Description
status_code
int

The status code for which the error page will be used.

Default value: None
content
str

The content of the error page. There is a 10kb limit imposed on custom error page content.

Default value: None
content_type
str

The content type of the error page. For example, 'text/html'.

Default value: None
always_use

If true, the error page will be shown for all requests with a matching status code, regardless of whether they failed on the App Service FrontEnd load balancer or on the app itself.

Default value: None

Variables

Name Description
status_code
int

The status code for which the error page will be used.

content
str

The content of the error page. There is a 10kb limit imposed on custom error page content.

content_type
str

The content type of the error page. For example, 'text/html'.

always_use

If true, the error page will be shown for all requests with a matching status code, regardless of whether they failed on the App Service FrontEnd load balancer or on the app itself.