Code should be able to throw a HTTPErrorCodeException pretty much anywhere and have that code honored, however, if the exception gets wrapped in a ServiceException on its way up, then the error code won't be applied.
There is a simple bug in the Dispatcher logic that needs fixing
Committed on master. Calling it a day for the moment, as it touches a very core part of the code. Will backport if needed later.
Mass closing all resolved issues not modified in the last 4 weeks