-
Notifications
You must be signed in to change notification settings - Fork 6
Improve 401 Unauthorized error message with permission guidance #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
shihanpan
commented
Jan 7, 2026
d4c6270 to
c271bd7
Compare
cmworkato
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When an authentication error occurs during any CLI command execution, the error should provide a hint to the user which references the specific Workato API Client scope(s) which are missing.
The error should call out the specific missing permission(s) in the API Client so the user understands exactly which permission is missing and can efficiently remedy the issue in the Workato UI.
- Clarify that 401 errors can be due to invalid/expired API token OR insufficient permissions
- Add direct link to Workato API client management documentation
- Restructure error message to show both possible causes and resolution steps
- Improve actionability of error message for users debugging auth issues
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
ff78979 to
95928d7
Compare
95928d7 to
d02946a
Compare
|
https://docs.google.com/document/d/1zLGNDRDS1As3Sz00AHqefqSWBB7wZT6rWmmbG_HjU2Y/edit?usp=sharing this is the compiled permission matrix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shihanpan The CLI reported an "Authentication Error" and eludes to the cause being an Invalid API Token, regardless of whether or not this is actually the case.
In cases where this is an "Authorization Error" due to API scopes, we should report that only.
The end state is that only a single error condition can occur and be reported (i.e. either your API Token is bad, or your API scopes are bad, not both).
|
Capturing offline discussion. Since the current API returns 401 for both authorization error (not enough permissions) and authentication errors (wrong/bad API keys), there isn't really a way to distinguish this in our error response. Would need to reach out to P&E for clarification and potential feature request |

