This request header contains the mode of the layer that Unpoly updates when the server sends an error response.
An error response has a status code other than 2xx, but still contains HTML.
Server-side code is free to render different HTML for different modes. For example, you might prefer to not render a site navigation for overlays.
Assume we have the following form in a drawer overlay. The form targets the root layer:
<!-- label: Form within an overlay -->
<form action="/submit" up-submit up-layer="root"> <!-- mark: up-layer="root" -->
...
</form>
Because failed form submissions update the <form> element,
submitting this form will send the following headers:
X-Up-Mode: root
X-Up-Fail-Mode: drawer
Tip Your coding agent can search these docs locally with the Unpoly agent skill