#109 Better error for disallowed route creation

0.50
open
nobody
2013-01-07
2013-01-07
No

When a context dopes not have the permissions to create a route a reasonable (not permitted?) exception & HTTP code should be returned, not a generic 500 error.

AccessForbiddenException: Context lacks role; cannot create workflow routes.
ERROR:http:Route creation failed.
Traceback (most recent call last):
  File "/home/awilliam/projects/coils-code/coils/net/handler.py", line 161, in process_request
    getattr(handler, 'do_{0}'.format(self.command))(self.request_name)
  File "/home/awilliam/projects/coils-code/coils/protocol/dav/workflow/routesfolder.py", line 101, in do_PUT
    raise CoilsException('Route creation failed.')

Discussion


Log in to post a comment.