Error pages
Error pages can be divided into business errors and platform errors.
Platform errors
Platform errors are errors that occur when an error appears in the application that is handled by default in the platform, e.g. a session expiration error.
In the above situation, an error page is displayed containing textContent set in the platform configuration errorPagesConfiguration
Example configuration:
<code_default>
<content>error_page_default-*</content>
</code_default>
<code_serverSessionExpired>
<content>error_page_serverSessionExpired-*</content>
<retryButtonAvailable>true</retryButtonAvailable>
<styleName>spider-night</styleName>
</code_serverSessionExpired>
<code_formLimitExceeded>
<content>error_page_formLimitExceeded-*</content>
</code_formLimitExceeded>Business errors
Business error is a situation in which a user's action, a system process, or interaction with an external system violates the adopted business rules - even though, from a technical point of view, the operation could be performed.
Examples:
Attempt to withdraw an amount exceeding available funds.
Submitting an application with an inactive customer account.
Entering the application as a not logged in user, even though login is required
How to invoke?
Business error can be invoked in script services and script validators. The best way to do this is to use the method throwBusinessException and getErrorPageDefinitionBuilder.
Methods that can be called on the context object:
Example script with descriptions:
Last updated
Was this helpful?
