Dispatcher module throws error for DispatcherPassError unknown values | Community
Skip to main content
MeasurableBusinessResults
November 23, 2023
Solved

Dispatcher module throws error for DispatcherPassError unknown values

  • November 23, 2023
  • 2 replies
  • 2888 views

I am trying to set DispatcherPassError so that it only forwards HTTP status code 412 to the browser, but passes all others to Apache for handling in an ErrorDocument.

With DispatcherPassError 1 all the ErrorDocuments work fine.

 

When I set 
DispatcherPassError 400-411,413-499,500-599
according to the documentation, it complains during Apache httpd startup with
Unsupported HTTP response code 499

I know that this code is currently undefined in the RFCs, but I want to configure it so it matches everything except 412, including all possible future/unknown status codes.

How can this be done?



It's not described in the docs, so don't just point me there, because I have read them already (https://experienceleague.adobe.com/docs/experience-manager-dispatcher/using/getting-started/dispatcher-install.html?lang=en ).

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 A_H_M_Imrul

@measurablebusinessresults 

Glad that it worked. 

Standards like HTTP status codes typically remain stable over time. Moreover, they aren't globally configured, allowing for custom setups tailored to individual applications using modules like 'disp_apache2.c'. The key aspect is that the implementer has the flexibility to prioritize error management according to their preferences: they might opt to handle errors internally or route them through the dispatcher.

2 replies

A_H_M_Imrul
Community Advisor
Community Advisor
November 23, 2023

@measurablebusinessresults 

Your approach looks valid, but I would suggest you try with the valid error codes:

4xx Client Error: 400 - Bad Request 401 - Unauthorized 402 - Payment Required 403 - Forbidden 404 - Not Found 405 - Method Not Allowed 406 - Not Acceptable 407 - Proxy Authentication Required 408 - Request Timeout 409 - Conflict 410 - Gone 411 - Length Required 412 - Precondition Failed 413 - Payload Too Large 414 - URI Too Long 415 - Unsupported Media Type 416 - Range Not Satisfiable 417 - Expectation Failed 418 - I'm a teapot 421 - Misdirected Request 422 - Unprocessable Entity 423 - Locked 424 - Failed Dependency 425 - Too Early 426 - Upgrade Required 428 - Precondition Required 429 - Too Many Requests 431 - Request Header Fields Too Large 451 - Unavailable For Legal Reasons 5xx Server Error: 500 - Internal Server Error 501 - Not Implemented 502 - Bad Gateway 503 - Service Unavailable 504 - Gateway Timeout 505 - HTTP Version Not Supported 506 - Variant Also Negotiates 507 - Insufficient Storage 508 - Loop Detected 510 - Not Extended 511 - Network Authentication Required

 

MeasurableBusinessResults
November 23, 2023

Yeah, that actually works, so

DispatcherPassError 400-411,413-451,500-511
is accepted.

But I don't really understand why the dispatcher module should bother to check - since the standard can change or some custom applications may want to use some custom codes at the end of the range.
In the end, we have to make sure ourselves that matching ErrorDocument directives exist, so why would the dispatcher module care?

A_H_M_Imrul
Community Advisor
A_H_M_ImrulCommunity AdvisorAccepted solution
Community Advisor
November 23, 2023

@measurablebusinessresults 

Glad that it worked. 

Standards like HTTP status codes typically remain stable over time. Moreover, they aren't globally configured, allowing for custom setups tailored to individual applications using modules like 'disp_apache2.c'. The key aspect is that the implementer has the flexibility to prioritize error management according to their preferences: they might opt to handle errors internally or route them through the dispatcher.

kautuk_sahni
Community Manager
Community Manager
November 28, 2023

@measurablebusinessresults Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

Kautuk Sahni