fix: catch permissions error in ora2 initialize API endpoint (#34284)

This commit is contained in:
Bryann Valderrama
2024-03-18 14:02:28 -05:00
committed by GitHub
parent 72063a4272
commit 67696699a3

View File

@@ -34,7 +34,12 @@ def get_submissions(request, usage_id):
if response.status_code != 200:
raise XBlockInternalError(context={"handler": handler_name})
return json.loads(response.content)
try:
return json.loads(response.content)
except json.JSONDecodeError as exc:
raise XBlockInternalError(
context={"handler": handler_name, "details": response.content}
) from exc
def get_assessments(request: Request, usage_id: str, handler_name: str, submission_uuid: str):