Expand my Community achievements bar.

SOLVED

How to Show Custom Error Messages for AEM Console Errors

Avatar

Level 2

Hi,

I am facing a security audit issue.

On the author instance of AEM 6.1 we have restricted user access to AEM communities, as communities is not used in our project.

But the error show by AEM reveals all the details of paths and components which we need to hide due to security concerns.

Is there any possible way, were we can hide this error message and show a customized access denied message to the users who are restricted from using Communities > Sites.

Please find the attached image for details about the error show which I need to hide as the security team has raised concerns over the internal paths shown in this errors.Sites-Error.pngAEM-Communities-Sites.png

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @sayalichougale,

 

Can I know how are you restricting the users to not access the communities' sites? The error in the screenshot says "NPE". If you are using any custom code, you need to handle the exception, add a better message to be shown to the end-user.

 

Also check if the component shown in the error "/libs/social/console/components/hbs/sitecollection" is available in your instance. 

 

In addition to the above steps, checking the error.log would also help you understand the reason for the error thrown on the page

 

Check this for more info https://experienceleague.adobe.com/docs/experience-manager-65/communities/develop/scf.html?lang=en#o...

 

Thanks,

Kiran Vedantam.

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @sayalichougale,

 

Can I know how are you restricting the users to not access the communities' sites? The error in the screenshot says "NPE". If you are using any custom code, you need to handle the exception, add a better message to be shown to the end-user.

 

Also check if the component shown in the error "/libs/social/console/components/hbs/sitecollection" is available in your instance. 

 

In addition to the above steps, checking the error.log would also help you understand the reason for the error thrown on the page

 

Check this for more info https://experienceleague.adobe.com/docs/experience-manager-65/communities/develop/scf.html?lang=en#o...

 

Thanks,

Kiran Vedantam.