Convert cubicweb.NotFound to HTTPNotFound
authorChristophe de Vienne <christophe@unlish.com>
Thu, 21 Aug 2014 21:43:24 +0200
changeset 11499 60a504740951
parent 11498 a8aaff87c1fc
child 11500 8e4935a1848b
Convert cubicweb.NotFound to HTTPNotFound Related to #4291173
pyramid_cubicweb/bwcompat.py
--- a/pyramid_cubicweb/bwcompat.py	Wed Aug 06 19:06:32 2014 +0200
+++ b/pyramid_cubicweb/bwcompat.py	Thu Aug 21 21:43:24 2014 +0200
@@ -84,6 +84,8 @@
                 # for this exception) should be enough
                 # content = self.appli.ajax_error_handler(req, ex)
                 raise
+            except cubicweb.web.NotFound as ex:
+                raise httpexceptions.HTTPNotFound(ex.message)
 
             if content is not None:
                 request.response.body = content