Skip to content

Configuring 404 Error Message

The show404Details flag controls the level of detail provided in REST API 404 (Page Not Found) error responses. This setting helps to prevent the exposure of potentially sensitive information in error messages.

By default, detailed 404 error messages are active. If you wish to prevent REST API responses from showing detailed 404 messages, you should disable this flag:

404 Error Message

Configuration File

.../WEB-INF/js.spring.properties

Property

Description

show404Details

When this property is set to true, REST API 404 responses have special characters escaped in strings using HTML character references (entities), and the response include detailed information. When it is set to false, the response is a general message, such as {"message":"Page Not Found","errorCode":"resource.not.found"}, to avoid displaying potentially sensitive information.

The default is true.