Added top-level exception handler to InboxView, since it seems to be experiencing difficulties.

Really this needs to be a more general solution.
status-serialisers
Marnanel Thurman 2020-09-30 16:20:22 +01:00
rodzic ceed10b278
commit c9ad177220
1 zmienionych plików z 14 dodań i 5 usunięć

Wyświetl plik

@ -493,11 +493,20 @@ class InboxView(CollectionView):
body = body,
)
validate(
path=request.path,
headers=request.headers,
body=body,
)
try:
validate(
path=request.path,
headers=request.headers,
body=body,
)
except Exception as problem:
import traceback
log.warning("Processing this message caused an exception: %s %s",
problem,
''.join(traceback.format_exception(
None, problem, problem.__traceback__)),
)
# I think this should be 201 Created, but the spec
# says 200, so 200 is what they get.