Skip to content

Commit 92a0192

Browse files
committed
fix: add error handling for invalid scope
1 parent 315a62d commit 92a0192

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

openedx_authz/api/validation.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ def validate_scope_with_glob(scope: ScopeData) -> None:
5454
if isinstance(scope, ContentLibraryData):
5555
return _validate_library_scope_glob(scope_prefix)
5656

57+
raise ValueError(f"Invalid scope: {scope}")
58+
5759

5860
def _validate_org_identifier(scope_prefix: str) -> str:
5961
"""Extract and structurally validate the organization identifier in a scope.

0 commit comments

Comments
 (0)