comparison libervia/server/pages.py @ 1285:37a582b0fe53

pages: 404 is now returne if a remote server is not found
author Goffi <goffi@goffi.org>
date Fri, 19 Jun 2020 16:47:51 +0200
parents 65c43eec15ad
children 63328c793a9e
comparison
equal deleted inserted replaced
1284:65c43eec15ad 1285:37a582b0fe53
1750 pass 1750 pass
1751 except BridgeException as e: 1751 except BridgeException as e:
1752 if e.condition == 'not-allowed': 1752 if e.condition == 'not-allowed':
1753 log.warning("not allowed exception catched") 1753 log.warning("not allowed exception catched")
1754 self.pageError(request, C.HTTP_FORBIDDEN) 1754 self.pageError(request, C.HTTP_FORBIDDEN)
1755 elif e.condition == 'remote-server-not-found':
1756 self.pageError(request, C.HTTP_NOT_FOUND)
1755 else: 1757 else:
1756 log.error(_("Uncatched bridge exception for HTTP request on {url}: {e}") 1758 log.error(_("Uncatched bridge exception for HTTP request on {url}: {e}")
1757 .format(url=request.URLPath(), e=e)) 1759 .format(url=request.URLPath(), e=e))
1758 try: 1760 try:
1759 self.pageError(request, C.HTTP_INTERNAL_ERROR) 1761 self.pageError(request, C.HTTP_INTERNAL_ERROR)