Skip to content

Unmask catch-all token exceptions - #563

Merged
casperdcl merged 4 commits into
develfrom
dont-mask-token-exception
May 28, 2021
Merged

casperdcl merged 4 commits into
develfrom
dont-mask-token-exception

Conversation

@0x2b3bfa0

@0x2b3bfa0 0x2b3bfa0 commented May 26, 2021 •

Copy link
Copy Markdown
Member

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

@DavidGOrtega DavidGOrtega left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

@DavidGOrtega

Copy link
Copy Markdown
Contributor

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

@DavidGOrtega

Copy link
Copy Markdown
Contributor

@0x2b3bfa0 #472

Comment thread src/cml.js 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

This branch was previously deployed

1 inactive deployment
test-internal — cd2d3239 Deployed May 27, 2021 by 0x2b3bfa0
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.

4 participants