chatch PermissionError and respond 500
This commit is contained in:
@@ -549,8 +549,12 @@ class Application(ApplicationPartDelete, ApplicationPartHead,
|
|||||||
else:
|
else:
|
||||||
profiler_active = True
|
profiler_active = True
|
||||||
|
|
||||||
status, headers, answer, xml_request = function(
|
try:
|
||||||
environ, base_prefix, path, user, remote_host, remote_useragent)
|
status, headers, answer, xml_request = function(
|
||||||
|
environ, base_prefix, path, user, remote_host, remote_useragent)
|
||||||
|
except PermissionError as e:
|
||||||
|
logger.error("PermissionError: %s", e)
|
||||||
|
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