From 33f6291e1f4a04e9a56b885dea187943fcfab7a4 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sun, 28 Oct 2012 19:00:32 -0400 Subject: util:wsgi: catch NoIDMatches in BEExceptionApp --- libbe/util/wsgi.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libbe/util/wsgi.py') 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): -- cgit