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
If VAST is a wrapper, and the VASTAdTagURI fails (e.g. due to missing CORS), onLoaded breaks, consequently the queryVAST onFetched callback is never called. onLoaded expects ads to be populated, there is no error checking in there.
(Possible solution, and workaround for me locally: If ads arrives as null in onLoaded, this.loaded is be set to true anyway and onAdAvailable is called, so errors could still be tracked, but I'm not sufficiently familiar with the recursion mechanism to actually decide this.)
The text was updated successfully, but these errors were encountered:
Hmm, I think you're on the right track with this.loaded = true and then calling onAdsAvailable. This will propagate out to the calling script which could then detect the error quite easily. The documentation for onAdsAvailable would have to be changed to say something along the lines of "this function should check that the list of available ads is non-empty which it might be in case of an error". I think we should also add a VastAds.errors = [] which will be pushed to when new errors are encountered that the developer can use for debugging purposes.
This is partially fixed by 018ba4f / #13 in that a callback is at least called. There's currently no reporting of what the error was, though that should be fairly straightforward to add.
If VAST is a wrapper, and the VASTAdTagURI fails (e.g. due to missing CORS), onLoaded breaks, consequently the queryVAST onFetched callback is never called. onLoaded expects ads to be populated, there is no error checking in there.
(Possible solution, and workaround for me locally: If ads arrives as null in onLoaded, this.loaded is be set to true anyway and onAdAvailable is called, so errors could still be tracked, but I'm not sufficiently familiar with the recursion mechanism to actually decide this.)
The text was updated successfully, but these errors were encountered: