If urlHandler returns a custom error (returns a promise resolved to a structure with error property)
VastClient.get does not return that error, but instead creates a new Error wrapping only a string representation of original error
I suggest it's better to return custom error instance as is, with all it's properties and prototype chain.
Considering that was the behavior in previous callback-style urlHandler (at least in version 5.0.0)
PR: #507
If
urlHandlerreturns a custom error (returns a promise resolved to a structure witherrorproperty)VastClient.getdoes not return that error, but instead creates anew Errorwrapping only a string representation of original errorI suggest it's better to return custom error instance as is, with all it's properties and prototype chain.
Considering that was the behavior in previous callback-style urlHandler (at least in version
5.0.0)PR: #507