Error handling in Administrator console with custom error page

cancel
Showing results for 
Search instead for 
Did you mean: 
ashokpivotal
Member II

Error handling in Administrator console with custom error page

Hi,
I would like to show the custom error page configured in web.xml of alfresco web app for the 401 ,400 ,500 errors.
web.xml configuration :

 <error-page>
		<error-code>401</error-code>
		<location>/errorPage.html</location>
	</error-page>
	<error-page>
		<error-code>500</error-code>
		<location>/errorPage.html</location>
	</error-page>
	<error-page>


Currently webscript errors in the admin console of alfresco thrown the exception in browser like below :

1) An error has occurred in the API: /alfresco/s/enterprise/admin.It responded with a status of 401 - Unauthorized.
Error Code Information: 401 - The request requires HTTP authentication.
Error Message: 03160008 Authentication failed for Web Script org/alfresco/enterprise/repository/admin/admin-root.get
Server: Alfresco Enterprise v5.2.5 (re0f49095-b17) schema 10,075
Time: Apr 16, 2021 12:26:53 PM

2)An error has occurred in the API: /alfresco/s/enterprise/admin.It responded with a status of 500 - Internal Error.
Error Code Information: 500 - An error inside the HTTP server which prevented it from fulfilling the request.
Error Message: 03160012 User does not exist and could not be created: test
Server: Alfresco Enterprise v5.2.7 (.2 rde4c74f1-b29) schema 10,095
Time: Apr 16, 2021 3:31:43 AM

I have configured the custom error page in web.xml. but it's not working. how to show the custom error page while 401 ,500 thrown by alfresco?

401error.JPG

 

1 Reply
afaust
Master

Re: Error handling in Administrator console with custom error page

The web script framework has its own error / status template handling and does not fall back to the global servlet error page set via web.xml. See response status code templates (documentation)