Make your js query fail and trigger calling onFailure()

This is mostly resolved by @church over here: How to force javascript query to fail?