Configuring error responses
You can configure your error handling to cover status codes, status categories, and exception classes. When a visitor encounters an issue, you can specify which page they are taken to and what content they see.
Error handling in Brightspot is configured in the Sites & Settings area.
To configure error handling:
- Click > Admin > Sites & Settings.
- In the Sites widget, select the site for which you want to configure this setting.
- From the Front-End tab, expand the Error cluster.
Under Error Handlers, click Add Content Error Handler.
You have three options available for error handling:
- Status Codes - enter the error status code you would like handled with this error handler.
- Status Categories - expand the menu and select either 4xx Client Error or 5xx Client error depending on which category for which you are creating the error handler.
- Exception Classes - enter the Java class for which you are creating the error handler. For instance, you could enter
IllegalArgumentException
to have that specific exception handled by this error handler.
- Using the descriptions above, select one of the options and enter the data for that type of error.
- In the Content field, click to open the content picker to choose the page you want visitors to be taken to if they encounter any of the error types configured above.
Complete steps 3–5 for each additional type of error you want handled in this site.
Error handling for 4xx Client ErrorClick Save.
Now when a visitor encounters any of the errors you specified, they are taken to the desired page. In the above image, whenever a visitor encounters a 4xx Client Error, they are taken to the
404 Error Page
specified in the Content field.