Skip to content

SES error censorship issues #2941

@naugtur

Description

@naugtur

Describe the bug

In some circumstances I've seen SES error censorship produce an error with a falsy value as message and a stack containing only references to SES concole implementation. Other times it corrupts the error message.

All examples I found to date seem related to errorTrapping implementation

I'll collect ways to reproduce it in this issue.

1. broken functionality

1.1. when opening a html file via file:// protocol with invalid syntax in a script, error gets censored to nothing. errorTrapping: "none" prevents the issue.

test1.tar.gz

1.2. When a multiline message is thrown in Node.js, SES will print all lines of the message, except first, twice.
(does not happen in the browser)
test2.tar.gz

2. bad UX

2.1. The Error("",{ cause: e }) output can be considered correct, but differs between errorTrapping default, errorTrapping: "none" and no lockdown at all.

test3.tar.gz

2.2. console output of unhandled rejections is not compatible with browsers

async function que() {
  throw Error('karramba')
}
que()

2.2.1. FireFox: the original uncaught error in promise is reported first, the SES version after a few seconds

Image Image

2.2.2. Both FireFox and Chromium: 3 console lines each are an error with a misleading stacktrace.

Image Image

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions