Enabling information about server errors in the JSON response
How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!
While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.
legacy-article
learn-legacy-article-disclaimer-text
Issue
- There is no error messages from api json services.
- How to manage the serialization and access to Json services
- In Liferay Portal 6.2 or DXP7.0 the server response is serialized and shows information related with server errors but now their are empty.
Resolution
- All the information responses from the server should be managed in order to avoid security leaks.
- With Json Api the exceptions are serialized and sended as they are generated. The following property was added to disable the Json service serialization. It is encouraged to set this to false in production environments:
json.service.serialize.throwable=false
- If enabled, is able to restring their use in different ways:
did-this-article-resolve-your-issue