Open sgnn7 opened 3 years ago
Note: there is a workaround until we fix this in #79 by sending a direct API request to this route
PR #83 contains partial work on this. The remaining logic for it needs to be written to take the newly-added username, compare it to the target of rotation, and error out if they are the same. Changelog will also need to be updated.
Summary
Due to the server-side change to not allow changing of the current user's API key via token, our use of
RotateAPIKeyRequest
will fail when the targetroleID
is the current user so we should raise an error eraly to notify the user about this.Steps to Reproduce
Steps to reproduce the behavior:
client.RotateAPIKey(roleID)
orclient.RotateAPIKeyReader(roleID)
Expected Results
User-friendly error
Actual Results (including error logs, if applicable)
401 error from the server
Reproducible
Version/Tag number
0.6.0
Environment setup
N/A
Additional Information
N/A