From: W. Trevor King Date: Sun, 28 Oct 2012 23:00:32 +0000 (-0400) Subject: util:wsgi: catch NoIDMatches in BEExceptionApp X-Git-Tag: 1.1.0~11 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=33f6291e1f4a04e9a56b885dea187943fcfab7a4;p=be.git util:wsgi: catch NoIDMatches in BEExceptionApp --- diff --git a/libbe/util/wsgi.py b/libbe/util/wsgi.py index eddf36f..d90311c 100644 --- a/libbe/util/wsgi.py +++ b/libbe/util/wsgi.py @@ -60,6 +60,7 @@ except ImportError: import libbe.util.encoding +import libbe.util.id import libbe.command import libbe.command.base import libbe.command.util @@ -318,6 +319,9 @@ class BEExceptionApp (WSGI_Middleware): except libbe.storage.InvalidID as e: raise libbe.util.wsgi.HandlerError( self.http_user_error, 'InvalidID {}'.format(e)) + except libbe.util.id.NoIDMatches as e: + raise libbe.util.wsgi.HandlerError( + self.http_user_error, 'NoIDMatches {}'.format(e)) class UppercaseHeaderApp (WSGI_Middleware):