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
myGet’s handler returns an error in the background page
content.js throws the error
Since the error was generated in the background page, its stack trace won't have any reference to myGet() nor its origin. Only the console will point to the throw Error inside the response handler, but nothing before that.
Maybe something like this will append the current stack trace to the error that was received:
I implemented this in my mini-library via Error#cause. In short, instead of deserializing the error and throwing it, I throw a new error and deserialize the other one into cause
myGet()
myGet
’s handler returns an error in the background pageSince the error was generated in the background page, its stack trace won't have any reference to
myGet()
nor its origin. Only the console will point to thethrow Error
inside the response handler, but nothing before that.Maybe something like this will append the current stack trace to the error that was received:
const error = deserializeError(response.error); + error.stack += Error.captureStackTrace(); throw error;
or
The text was updated successfully, but these errors were encountered: