Mercurial > libervia-web
comparison libervia/server/pages.py @ 1319:6e2821e78489
pages: render HTTP_NOT_FOUND page on `item-not-found` bridge error.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 01 Aug 2020 16:47:24 +0200 |
parents | 38875bc292ff |
children | a0954b6610aa |
comparison
equal
deleted
inserted
replaced
1318:38875bc292ff | 1319:6e2821e78489 |
---|---|
1779 pass | 1779 pass |
1780 except BridgeException as e: | 1780 except BridgeException as e: |
1781 if e.condition == 'not-allowed': | 1781 if e.condition == 'not-allowed': |
1782 log.warning("not allowed exception catched") | 1782 log.warning("not allowed exception catched") |
1783 self.pageError(request, C.HTTP_FORBIDDEN) | 1783 self.pageError(request, C.HTTP_FORBIDDEN) |
1784 elif e.condition == 'item-not-found': | |
1785 self.pageError(request, C.HTTP_NOT_FOUND) | |
1784 elif e.condition == 'remote-server-not-found': | 1786 elif e.condition == 'remote-server-not-found': |
1785 self.pageError(request, C.HTTP_NOT_FOUND) | 1787 self.pageError(request, C.HTTP_NOT_FOUND) |
1786 else: | 1788 else: |
1787 log.error(_("Uncatched bridge exception for HTTP request on {url}: {e}") | 1789 log.error(_("Uncatched bridge exception for HTTP request on {url}: {e}") |
1788 .format(url=request.URLPath(), e=e)) | 1790 .format(url=request.URLPath(), e=e)) |