#89 Send ProviderException with the correct error code and message
Merged by puiterwijk. Opened by puiterwijk.
puiterwijk/ipsilon exceptions-correct-code  into  master

Download 89.patch

This makes a ProviderException(400, ..) actually send a 400 status code,
and display the correct message.
Otherwise, we were sending an error 500, because cherrypy did not
know how to interpret Exception's rather than cherrypy.HTTPError.

Signed-off-by: Patrick Uiterwijk puiterwijk@redhat.com

rebased

rebased

rebased

Seems a little odd to me that you override self.code.
I would have expected more something along the lines of:
super(ProviderException, self).__init__(code or self.code, self.message)

Or (above in the code):

if not code:
    code = self.code

rebased

Cool, :thumbsup: for me

rebased

Pull-Request has been merged by puiterwijk

Metadata