EP: Portal – Customizing Error Messages?
As we all know customization is a key process in many organizational environment landscapes across various aspects of the Portal. Such customization can range from something very high level such as the theme and branding to a more concise detailed aspect such as button display or element syntax. In this blog posting we are going to touch base on error messages and exception reference highlights which can unfortunately be encountered on more occasions than desired for a wide range of reasons. In some scenarios tweaking the error message display can in fact be beneficial to end-users as it provides more informative insight into why the issue first arose and the steps which are subsequently required to resolve it.
Some error messages may arise due to syntax vulnerabilities through web security scans or through applications themselves. End Users may not be familiar with troubleshooting such occurrences and for this reason transforming an error occurrence such as:
- java.lang.NullPointerException: while trying to invoke the method com.sapportals.wcm.repository.IResource.isA(java.lang.Class) of a null object loaded from local variable ‘resource’
Into some a little more informative and insightful might be a better option to pursue.
Is Such Customization Possible?
Ok from the perspective of the Enterprise Portal (EP) customizing error messages from broad level overview is indeed possible and feasible. The first point of reference I would like to make here relates to the following link. This offers a comprehensive overview of what customizations can be made.
- Customizing Error Messages In The Enterprise Portal: http://wiki.scn.sap.com/wiki/display/EP/Customizing+Error+Messages+in+Portal
Now in terms of a broader scope and more concise detailed guidance on how to customize a particular error message in the Enterprise Portal such as a “500 Internal Server Message” kindly review the documentation outlined below:
- How to customize the SAP Portal Error Pages: http://scn.sap.com/people/aviad.rivlin/blog/2010/05/06/how-to-customize-the-sap-portal-error-pages
- Custom Error Messages in the Portal: http://scn.sap.com/people/hussain.sehorewala/blog/2010/03/26/custom-error-messages-in-the-portal
From a high level perspective there are some important points to highlight regarding a proposed change regarding error exceptions. If you configure dynamic error pages, this will override the standard error pages. In that case the value of this parameter (/HTTP/show_detailed_errors) as per the guidance WIKIs above is is irrelevant. For security reasons the details should not passed to the client. SAP recommends that you do not change the value of the default setting (is/HTTP/show_detailed_errors = FALSE), unless you want to use the detailed information for error analysis and it is not critical for security.
Making Error Messages More Friendly
There is the more simple option of making specific error references more legible to end users bases through the Web Browser Platform. You can simply through the Browser follow the path:
- Tools > Internet Options > Advanced and check “show friendly http error messages”.
Is it possible to customize this"Highlighted with bold" message and display a more user friendly message on the portal.
For example below mentioned standard error message to our own custom message.
An exception occurred during the program execution.
Exception Message: Connection Failed: Connection setup failedConnection Failed: A nested exception occurred. Could not initialize physical connection
Please guide me to customize this standard message to our own message to display in SAP Portal.Is there any file available to modify for this error message provide me path to customize.
Thanks and Regards,