fix: catch permissions error in ora2 initialize API endpoint (#34284)
This commit is contained in:
committed by
GitHub
parent
72063a4272
commit
67696699a3
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user