Skip to content
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

Unmask catch-all token exceptions #563

Merged
merged 4 commits into from
May 28, 2021
Merged

Conversation

0x2b3bfa0
Copy link
Member

@0x2b3bfa0 0x2b3bfa0 commented May 26, 2021

Masking all the errors derived from this function is highly counterproductive in some edge cases. At least, bad credentials and not found are common but separate errors, and mixing them can lead to long and frustrating blind debugging sessions.

CML components rely heavily on services we don't control, and errors are hard to reproduce and hard to trace. While the happy path should be as pretty as possible for end users, errors should be as verbose as possible and contain as much useful non-sensitive information as we manage to extract.

As @DavidGOrtega suggested, we may also implement some sort of wrapper and print a few suggestions for the possible causes for each error, but outputting the original error message is a must.

See also

@0x2b3bfa0 0x2b3bfa0 added the enhancement New feature or request label May 26, 2021
@0x2b3bfa0 0x2b3bfa0 self-assigned this May 26, 2021
@0x2b3bfa0 0x2b3bfa0 temporarily deployed to test-internal May 26, 2021 22:00 Inactive
Copy link
Contributor

@DavidGOrtega DavidGOrtega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@DavidGOrtega
Copy link
Contributor

We have a couple of this also. One is regarding the GL endpoint @0x2b3bfa0

@DavidGOrtega
Copy link
Contributor

@0x2b3bfa0 #472

src/cml.js Outdated Show resolved Hide resolved
@0x2b3bfa0 0x2b3bfa0 temporarily deployed to test-internal May 27, 2021 20:43 Inactive
@0x2b3bfa0 0x2b3bfa0 requested a review from casperdcl May 27, 2021 20:44
@0x2b3bfa0 0x2b3bfa0 temporarily deployed to test-internal May 27, 2021 20:45 Inactive
It was a lapsus
@0x2b3bfa0 0x2b3bfa0 temporarily deployed to test-internal May 27, 2021 20:55 Inactive
@0x2b3bfa0 0x2b3bfa0 changed the base branch from master to devel May 28, 2021 15:52
@0x2b3bfa0 0x2b3bfa0 changed the title Remove catch-all block for token exceptions Avoid hiding token exceptions under a opaque catch-all block May 28, 2021
@0x2b3bfa0 0x2b3bfa0 changed the title Avoid hiding token exceptions under a opaque catch-all block Avoid hiding token exceptions under an opaque catch-all block May 28, 2021
@casperdcl casperdcl changed the title Avoid hiding token exceptions under an opaque catch-all block Unmask catch-all token exceptions May 28, 2021
@casperdcl casperdcl merged commit 9fb3740 into devel May 28, 2021
@casperdcl casperdcl deleted the dont-mask-token-exception branch May 28, 2021 22:08
@casperdcl casperdcl mentioned this pull request May 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants