Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Customizing error messages

Updated on December 13, 2022
Applicable to Theme Cosmos applications

Customize default error messages to ensure a more meaningful communication with users and match your business requirements, for example, branding.

Before you begin: Ensure that you have an unauthenticated access group in your application ruleset with the PegaRULES:Guest role. For more information, see Learning about access groups.
An out-of-the-box HTML rule pyStatusResponse handles error message customizations, which helps avoid modifications in the prweb\diagnostic\status.jsp deployment file that impact application updates.
Note: If you have existing customizations, migrate them to the HTML rule by using the following procedure.
  1. In the header of Dev Studio, search for and open the pyStatusResponse HTML rule.
  2. Expand the Save as list, and then click Specialize by class or ruleset to save an instance of the rule in your application ruleset.
  3. On the HTML tab, modify the error message.
    For example:
    <body>
    <div class='status-msg'>
    <h1>Critical Error</h1>
    <p>Something went wrong. Please contact the administrator at [email protected]</p>
    </div>
    </body>
    You can customize the HTML code by adding CSS or a company logo.
  4. Click Save.
  5. Add the unauthenticated access group to the browser requestor.
    1. In the navigation pane of Dev Studio, click Records.
    2. Expand the SysAdmin category, and then click Requestor Type.
    3. Open the browser requestor type for your application.
      For example: UPLUS!BROWSER.
    4. In the Access group name section, add the unauthenticated access group, and then select the radio button that is next to the group.
    5. Click Save.
For example: The following figure represents the default error message:
The default error message stating that you have no access to the application.
The following figure represents a sample custom error message:
Custom error message with instructions to email the administrator.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us