-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VASTClient not throwing error or emitting wrong error code for invalid wrapper VAST #476
Comments
Thanks for raising the issue, we will look at it asap 😉 |
Hello, I've looked at the issues:
We're going to fix it, but if you'd like a quick fix, feel free to contribute by opening a pull request! We'll be happy to look into it ! |
Hello, |
Hi, I'm using version 6.0.1 and noticing inconsistent behavior with the VASTClient in how it processes wrapper VASTs that contain errors. The following sample code contains two wrapper VASTs; expected vs actual behavior is indicated in comments. (Just swap the
test
constant.) Also attaching the package.json file. package.jsonexpects303Error
VAST is a two-layer wrapper that eventually points to an empty VAST document:<VAST xsi:noNamespaceSchemaLocation="vast.xsd" version="3.0"/>
. According to the docs, the error code for "No VAST response after one or more Wrappers" is 303. However, no 'VAST-error' event is emitted for this VAST.expectsThrowError
wrapper VAST points to an unsupported 1.0 VAST document; in this case, my understanding is that the VASTClient'sparseVAST
method should return a rejected Promise since the root element is not 'VAST'. However, the resulting promise is not rejected, and the parser emits a 'VAST-error' with the 301 (timeout) code. (If you follow the VASTAdTagURI link and copy the VAST 1.0 XML from there, then pass it toparseVAST
, then the expected rejected Promise is returned.)The text was updated successfully, but these errors were encountered: