delay_on_error: catch all (not only PermissionDenied) execptions
This commit is contained in:
@@ -36,6 +36,7 @@ import pprint
|
|||||||
import pstats
|
import pstats
|
||||||
import random
|
import random
|
||||||
import time
|
import time
|
||||||
|
import traceback
|
||||||
import zlib
|
import zlib
|
||||||
from http import client
|
from http import client
|
||||||
from typing import Iterable, List, Mapping, Tuple, Union
|
from typing import Iterable, List, Mapping, Tuple, Union
|
||||||
@@ -574,6 +575,10 @@ class Application(ApplicationPartDelete, ApplicationPartHead,
|
|||||||
except PermissionError as e:
|
except PermissionError as e:
|
||||||
logger.error("PermissionError: %s", e)
|
logger.error("PermissionError: %s", e)
|
||||||
status, headers, answer, xml_request = httputils.INTERNAL_SERVER_ERROR
|
status, headers, answer, xml_request = httputils.INTERNAL_SERVER_ERROR
|
||||||
|
except Exception as e:
|
||||||
|
logger.error("Exception: %s", e)
|
||||||
|
logging.error("%s", traceback.format_exc())
|
||||||
|
status, headers, answer, xml_request = httputils.INTERNAL_SERVER_ERROR
|
||||||
|
|
||||||
# Profiling
|
# Profiling
|
||||||
if self._profiling_per_request:
|
if self._profiling_per_request:
|
||||||
|
|||||||
Reference in New Issue
Block a user