Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

custom error messsage not showing on dispatcher

anelem1760873
Level 4
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
anelem1760873
Correct answer by
Level 4
Level 4

DispatcherPassError 0 Solved the issue.

View solution in original post

4 Replies
ChitraMadan
Community Advisor
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?

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

DispatcherPassError 0 Solved the issue.

View solution in original post

kautuk_sahni
Community Manager
Community Manager
Thank you for sharing the solution with community.