Conversation
|
The style in this PR agrees with This formatting comment was generated automatically by a script in uc-cdis/wool. |
gen3/auth.py
Outdated
| "No idp matched with the endpoint or idp value provided.\n" | ||
| + "Please make sure your endpoint or idp value matches exactly with the output below.\n" | ||
| + "i.e. check trailing '/' character for the endpoint url\n" | ||
| + "Avalable Idps:" |
There was a problem hiding this comment.
| + "Avalable Idps:" | |
| + "Available Idps:" |
gen3/auth.py
Outdated
| "No idp matched with the endpoint or idp value provided.\n" | ||
| + "Please make sure your endpoint or idp value matches exactly with the output below.\n" | ||
| + "i.e. check trailing '/' character for the endpoint url\n" | ||
| + "Avalable Idps:" |
There was a problem hiding this comment.
How about using triple quotes for the ValueError string so that \n and + aren't required?
There was a problem hiding this comment.
I experimented with using triple quotes string. I needed to format in the idp_list variable and somehow this makes the error message look funky with all the extra indents. See below. Tried to solve this using textwrap.dedent() and inspect.cleandoc() but neither work with a string that's been formatted. Think keeping it as is probably the way to go for now.
ValueError: No idp matched with the endpoint or idp value provided. Please make sure your endpoint or idp value matches exactly with the output below. i.e. check trailing '/' character for the endpoint url Available Idps: idp name: test-google Endpoint url: https://test-commons.org Query /wts/external_oidc/ for more information.
BMH-111
Improvements
Logging and error improvement.