When the handle clienterrors activity is triggered in pega?

HandleClientErrors activity is triggered when client-side validation errors occur on the UI.

Is that right?

HandleClientErrors activity is triggered during client-side validation

HandleClientErrors is invoked only when client-side validation fails and Pega must notify the server that these client-side errors prevented further processing, specifically during submission actions such as clicking Submit, Finish Assignment, triggering a refresh section that requires validation, or firing an AJAX event that involves server interaction. It does not run for every UI error—only for those situations where Pega needs to synchronize the UI state with the server.
When a user performs an action, Pega first executes JavaScript-based client-side validations such as required-field checks, invalid dates, incorrect number formats, regex mismatches, or UI control constraints. If any of these validations fail, Pega stops the intended server call and the UI runtime invokes HandleClientErrors to inform the server that the action must not proceed.
The activity creates an empty clipboard page and message list to structure the JSON response, marks the event as a ‘clientError’ so that flows, data transforms, activities, or any post-processing are not executed, prevents the server from executing the intended action (avoiding inconsistent case transitions), and instructs the UI to render error‑related markup- As a result, the user remains on the same screen with no navigation or case progression until the errors are corrected.

1 Like

Thanks Vikas, This is helpful