Skip to content

Commit 27e1bf7

Browse files
committed
Improve error message to fix 710
1 parent c7ec8a8 commit 27e1bf7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

msal/application.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -624,8 +624,12 @@ def _decorate_scope(
624624
# We could make the developer pass these and then if they do they will
625625
# come back asking why they don't see refresh token or user information.
626626
raise ValueError(
627-
"API does not accept {} value as user-provided scopes".format(
628-
reserved_scope))
627+
"""You cannot use any scope value that is reserved.
628+
Your input: {}
629+
The reserved list: {}""".format(list(scope_set), list(reserved_scope)))
630+
raise ValueError(
631+
"You cannot use any scope value that is in this reserved list: {}".format(
632+
list(reserved_scope)))
629633

630634
# client_id can also be used as a scope in B2C
631635
decorated = scope_set | reserved_scope

0 commit comments

Comments
 (0)