TypeScript Does Not See error.original
in Error Handler
#925
Labels
bug
M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented
semver:minor
TypeScript-specific
Milestone
Description
The error that comes through to the global error handler is typed as
CodedError
, and as such, when trying to reference theoriginal
ororiginals
property, TypeScript says that it does not exist.So far, this is the only thing that has worked:
While this works, it is very restrictive. If a new type of error were to be introduced into Bolt with an
original
property, it would not make its way into this block of code.A much more preferred way would be something like:
Or even:
Perhaps it would make sense to add all possible optional properties to the
CodedError
interface?What type of issue is this? (place an
x
in one of the[ ]
)Requirements (place an
x
in each of the[ ]
)The text was updated successfully, but these errors were encountered: