custom error messsage not showing on dispatcher | Community
Skip to main content
anelem1760873
Level 4
January 27, 2021
Solved

custom error messsage not showing on dispatcher

  • January 27, 2021
  • 2 replies
  • 1347 views

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);

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by anelem1760873

DispatcherPassError 0 Solved the issue.

2 replies

ChitraMadan
Community Advisor
Community Advisor
January 27, 2021

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?

anelem1760873
Level 4
January 27, 2021
Nothing on the logs, this is only author on localhost:4502 it's working but on the domain it's not.
anelem1760873
anelem1760873AuthorAccepted solution
Level 4
January 27, 2021

DispatcherPassError 0 Solved the issue.

kautuk_sahni
Community Manager
Community Manager
January 28, 2021
Thank you for sharing the solution with community.
Kautuk Sahni