Using vike-react-query (v0.0.4), I've noticed that no errors caught by withFallback's error boundary seem to have any of their standard properties, other than message.
I would have expected this code to log an object with name, message, cause, and stack properties, but it only has message.
As far as I can tell, the cause of this is because Error keys are not enumerable, so they are ignored in the Object.assign call that creates the error prop. Trying this directly in the console does the same thing - Object.assign({message: "test"}, new Error("Test!")) returns {message: "test"}.
Using vike-react-query (v0.0.4), I've noticed that no errors caught by
withFallback
's error boundary seem to have any of their standard properties, other thanmessage
.For example:
I would have expected this code to log an object with
name
,message
,cause
, andstack
properties, but it only hasmessage
.As far as I can tell, the cause of this is because
Error
keys are not enumerable, so they are ignored in theObject.assign
call that creates the error prop. Trying this directly in the console does the same thing -Object.assign({message: "test"}, new Error("Test!"))
returns{message: "test"}
.