---
category: [Administration & Integrations, Platform and Product Extensions, Platform and Product Extensions/Integration, Administration & Integrations/Custom Integrations & Apps, Platform and Product Extensions/Workday Extend]
keyword: [Extend, Presentation Components, widgets, tags, UI components]
nav: wcp_docs
parent_url: /wcp_docs/
title: applicationException
layout: subsection
wd_wcptag: applicationException
---

<a id="section_N10021_N1001E_N10001"></a>
Displays a custom error or warning message if the page encounters an exception during the page load. A common use case is when an endpoint returns a response indicating that the entire page is invalid. Use `applicationException` on view and edit pages.

Specify the `applicationException` tag in the `applicationExceptions` array in the `presentation` subschema. Set the `render` attribute to determine when to display the exception window.

You can use `applicationException` with these tags as the top-level tag under `body`:

-   `areaLayout`
-   `basicFormLayout`
-   `editWizard`
-   `section`


To use `applicationException` with `section`, you must ensure that:

-   The `section` tag doesn't include a `title`.
-   The `section` tag doesn't include a `horizontal` attribute, or the `horizontal` attribute is set to false.


## <a id="section_xwq_hq2_fhb"></a>Example

This sample page an `onLoad` event handler to perform a validation during the page load, and uses `applicationExceptions` to display an error or warning as a result of the validation.

```
{
"id": "checkTimeValidations",
"endPoints": [
{
 "baseUrlType": "workday-timeTracking",
 "name": "timeValidations",
 "authType": "sso",
 "url": "/timeValidations"
}
],
"onLoad": "<%
 pageVariables.hasError = false;
 pageVariables.hasWarning = false;
 if ( queryParams.needTimeValidations && (timeValidations.total == 0)) {
     pageVariables.hasError = true;
 } else {
     pageVariables.hasWarning = true;
 }
%>",
"presentation": {
"pageType": "edit",
"body": {
 "type": "section",
 "horizontal": false,
 "children": [
   {
     "type": "checkBox",
     "label": "Need time validations?",
     "value": "<% queryParams.needTimeValidations %>"
   }
 ]
},
"applicationExceptions": [
 {
   "type": "applicationException",
   "severity": "ERROR",
   "message": "<% 'Required time validations are missing. Contact your administrator.' %>",
   "render": "<% pageVariables.hasError %>"
 },
 {
   "type": "applicationException",
   "severity": "WARNING",
   "message": "<% 'Time validations will be skipped.' %>",
   "render": "<% pageVariables.hasWarning %>"
 }
]
}
}
```

## <a id="section_kt1_dkg_5cb"></a>Attributes

-   <b>id</b>

    Data type: binding-String

    Unique identifier used to reference this widget from other tags.

    Notes:

    -   The `id` must start with a letter.
    -   The `id` must be unique per page.
    -   To enable other widgets to reference this widget `id`, place this widget before the other widgets on the PMD. The PMD validation returns an "Undefined variable" error if it doesn't find a previously defined `id` in the PMD.
    -   Workday recommends that you include the `id` in your tag definitions for debugging purposes.

-   <b>message</b>

    Data type: binding-String

    A custom message that describes an exception.

-   <b>render</b>

    Data type: binding-Boolean

    If true, this tag renders as a widget on the page. If false, the loaded page doesn't add this tag or its children. The default is true.

    Unlike the `visible` attribute, when `render` is false, other tags on the page can't reference this tag or widget on edit pages. On view pages, a tag can't reference other tags regardless of the `render` attribute value.

-   <b>severity</b>

    Data type: binding-Severity

    The severity of the exception. Severity can either be an error or a warning. Possible values:

    -   ERROR
    -   WARNING (default)



