Closed rustyjux closed 2 months ago
If I try to use the display name to set the current gateway, I get the 403 error when running gwa gateway current
. Are there plans to make this error message more informative (I know the next steps point to the solution) or add some sort of error handling to gwa config set
? Is it possible to modify the command to support display names?
PS C:\Users\TIMNG> gwa gateway current
Display Name Gateway ID
TIMNG's protected gw gw-683b1
PS C:\Users\TIMNG> gwa config set gateway Sept 3
✓ Config settings saved
PS C:\Users\TIMNG> gwa gateway current
Next Steps:
1. Run gwa gateway list
2. Check if Sept is in the list
3. If not, run gwa config set gateway <Gateway ID> with a valid Gateway ID
Error: Missing authorization scope. (403)
The CLI reference doesn't mention display name vs gateway ID explicitly (should we also replace ns-sampler
with gw-?
):
https://dev.developer.gov.bc.ca/docs/default/component/aps-infra-platform-docs/reference/gwa-commands/#configset
Apologies if highlighted in another issue I didn't come across.
Here's the current state of new output for an invalid or inaccessible current gateway:
❯ just run gateway current
Error: Missing authorization scope. (403)
Next steps:
1. Run 'gwa gateway list'
2. Check if 'not-a-real-gw' is in the list
3. If not, run 'gwa config set gateway <Gateway ID>' with a valid Gateway ID
Good call on updating the CLI help for config set
to specify Gateway ID. See latest commit.
Btw if you want to preview CLI changes locally, see https://github.com/bcgov/gwa-cli/blob/feature/ns-to-gw/contribute.md#development. I found it quite easy to get set up in WSL.
There is #115 which touches on some other possible refinement for config set
.
Description
Expanding on the fixes to #111, this PR includes:
show error messages for
gateway current
before the 'Next steps' text.Next Steps:
Error: Missing authorization scope. (403)
Types of changes
Checklist