lotus/router — pull request #10 by Nerian (2014-06-08 17:16:55+00:00)
Title: Review exceptions

Hi,

If the Endpoint specified in the routes cannot be resolved or an exception is raised, the http status code should default to 500 Internal Server Error. Right now it sends a 405 Method Not Allowed.

I think a 500 is the one to use because the developer clearly specified that the route exist – thus the method and path are allowed – but failed to implement it correctly, causing an Internal Server Error.

What do you think?

I implemented the tests for this and I gave it a try to make it green but I wasn't sure where should I put the code to handle those cases.