Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

custom error messsage not showing on dispatcher

Avatar

Level 4

Hi There,

 

The following code works if I hit directly on the Author instance it works but i doesn't work on the dispatcher side. the message is not shown. any advice what i could be doing wrong here.

response.getWriter().write(String.format("<div><p id='Status'>400</p><p id='Message'>%s</p></div>", msg));
response.setContentType(ContentType.TEXT_HTML.getMimeType());
response.setStatus(400);

 

1 Accepted Solution

Avatar

Correct answer by
Level 4

DispatcherPassError 0 Solved the issue.

View solution in original post

4 Replies

Avatar

Community Advisor

Hi @anelem1760873 ,

 

Please make sure that publisher has the same code as well.

What do you get if you try to access with the dispatcher? Can you see any error in the logs?

Avatar

Level 4
Nothing on the logs, this is only author on localhost:4502 it's working but on the domain it's not.

Avatar

Correct answer by
Level 4

DispatcherPassError 0 Solved the issue.

Avatar

Administrator
Thank you for sharing the solution with community.


Kautuk Sahni