summaryrefslogtreecommitdiff
path: root/src/home/http/http.py
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2022-06-12 14:45:11 +0300
committerEvgeny Zinoviev <me@ch1p.io>2022-06-12 14:45:11 +0300
commitdb5e8e14fef8b6afa8d6922602a9b336f66d639b (patch)
tree1f6118bd6f98864205e9e08ae10dcacc8a2bcd54 /src/home/http/http.py
parentbf45c8a28203eafa75cb080b9265be164ab6230f (diff)
ipcam_server: try to fix something....
Diffstat (limited to 'src/home/http/http.py')
-rw-r--r--src/home/http/http.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/home/http/http.py b/src/home/http/http.py
index acacb51..6ce16c4 100644
--- a/src/home/http/http.py
+++ b/src/home/http/http.py
@@ -7,6 +7,9 @@ from aiohttp.web_exceptions import HTTPNotFound
from ..util import stringify, format_tb, Addr
+_logger = logging.getLogger(__name__)
+
+
@web.middleware
async def errors_handler_middleware(request, handler):
try:
@@ -17,6 +20,7 @@ async def errors_handler_middleware(request, handler):
return web.json_response({'error': 'not found'}, status=404)
except Exception as exc:
+ _logger.exception(exc)
data = {
'error': exc.__class__.__name__,
'message': exc.message if hasattr(exc, 'message') else str(exc)