You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improve error message if not full token is not copied (Checksum correct) #1859
If you fail to copy the full token - we should improve the error message to tell users they fucked up copying the full token (because checksum check failed)
@HazAT I proposed a simpler change in #1876 that would add the more specific error message when a 401 status code is received from the server. Adding the error message based on the HTTP status allows us to skip parsing and validating the auth token client-side, but of course, we might end up adding the message even when the auth token was correctly copied, but some other problem occurred (e.g. token was revoked). Since the error message I wrote only instructs users to make sure they copied the token correctly, I think it is okay to add the message even when the error has a different cause.
What do you think -- does #1876 accomplish what you wanted, or should we add the client-side validation for the auth token?
No, I would not do it like this: 401 represents another error and showing only this message for 401 could confuse users even more.
If the token is malformed can and should be validated by the client and has nothing to do with the return code.
Activity
szokeasaurusrex commentedon Dec 6, 2023
We also need to make sure we validate the token on the client (or server) before sending
szokeasaurusrex commentedon Dec 27, 2023
@HazAT I proposed a simpler change in #1876 that would add the more specific error message when a 401 status code is received from the server. Adding the error message based on the HTTP status allows us to skip parsing and validating the auth token client-side, but of course, we might end up adding the message even when the auth token was correctly copied, but some other problem occurred (e.g. token was revoked). Since the error message I wrote only instructs users to make sure they copied the token correctly, I think it is okay to add the message even when the error has a different cause.
What do you think -- does #1876 accomplish what you wanted, or should we add the client-side validation for the auth token?
HazAT commentedon Dec 29, 2023
No, I would not do it like this:
401represents another error and showing only this message for401could confuse users even more.If the token is malformed can and should be validated by the client and has nothing to do with the return code.
szokeasaurusrex commentedon Dec 29, 2023
Good point @HazAT – let's implement the validation per the original plan in that case
feat(api): Validate Auth Tokens client-side (#1885)
szokeasaurusrex commentedon Jan 5, 2024
Reopening, since we needed to revert #1885 to fix #1888 temporarily, while we figure out what is causing #1888.
feat(api): Validate Auth Tokens client-side (#1885)
fix(api): Fix panic that occurred when `sentry-cli login` called with…