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
Expected behavior
Without digging in to see if this is somewhat intentional or not, I would expect the logger to handle this type of error without fatal error (ie how other errors are handled successfully).
Error stack
node:internal/per_context/domexception:17
const err = new Base();
^
TypeError: Value of "this" must be of DOMException
at throwInvalidThisError (node:internal/per_context/domexception:17:15)
at get name [as name] (node:internal/per_context/domexception:82:7)
at formatError (node:internal/util/inspect:1362:20)
at formatRaw (node:internal/util/inspect:986:14)
at formatValue (node:internal/util/inspect:841:10)
at inspect (node:internal/util/inspect:365:10)
at formatWithOptionsInternal (node:internal/util/inspect:2273:40)
at formatWithOptions (node:internal/util/inspect:2135:10)
at transportFormatted (/home/<app>/node_modules/.pnpm/[email protected]/node_modules/tslog/dist/cjs/runtime/nodejs/index.js:98:44)
at Logger.log (/home/<app>/node_modules/.pnpm/[email protected]/node_modules/tslog/dist/cjs/BaseLogger.js:121:34)
at Logger.error (/home/<app>/node_modules/.pnpm/[email protected]/node_modules/tslog/dist/cjs/index.js:29:22)
at <anonymous> (/home/<app>/src/run.ts:71:10)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'ERR_INVALID_THIS'
}
Node.js Version
v18.16.0
OS incl. Version
Ubuntu 22.04
The text was updated successfully, but these errors were encountered:
Describe the bug
When the logger attempts to report an error thrown by a native Node
AbortController
, it appears to crash expecting aDOMException
.To Reproduce
Steps to reproduce the behavior:
In the above case, TSLog will fatally error attempting to handle the uncaught abort signal.
However, if the abortable function is wrapped in a try/catch block with a native Node error, it appears to function correctly:
Expected behavior
Without digging in to see if this is somewhat intentional or not, I would expect the logger to handle this type of error without fatal error (ie how other errors are handled successfully).
Error stack
Node.js Version
v18.16.0
OS incl. Version
Ubuntu 22.04
The text was updated successfully, but these errors were encountered: