1
Vote

HttpResponseException doesn't work in custom IHttpRoute implementation

description

I have a custom IHttpRoute implementation for doing some custom routing. I want to throw a 400 (bad request) sometimes. I tried to do a "throw new HttpResponseException()" in my code but the client always receives a 500.

comments

HongmeiG wrote Apr 6 at 6:09 AM

Please investigate this.

youssefm wrote May 14 at 7:45 PM

I have code review comments that need to be addressed.

youssefm wrote May 14 at 7:51 PM

In particular:
  1. Exceptions thrown in message handlers should be dealt with in the same way - the catch all belongs at the httpserver layer.
  2. Routing errors on the request seem to add unnecessary complexity