Skip to content

Commit 956750c

Browse files
committed
feat: added UserQualificationError handling
1 parent fb9bac2 commit 956750c

File tree

1 file changed

+3
-0
lines changed
  • packages/examples/cvat/exchange-oracle/src/endpoints

1 file changed

+3
-0
lines changed

packages/examples/cvat/exchange-oracle/src/endpoints/exchange.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,9 @@ async def create_assignment(
411411
except oracle_service.UserHasUnfinishedAssignmentError as e:
412412
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail=str(e)) from e
413413

414+
except oracle_service.UserQualificationError as e:
415+
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail=str(e)) from e
416+
414417
if not assignment_id:
415418
raise HTTPException(
416419
status_code=HTTPStatus.BAD_REQUEST,

0 commit comments

Comments
 (0)