Hello!
I think you can handle the errors directly in the Event Handlers of the JS Query and have it run a script/trigger what to do on an error. You can also just await the fooQuery.trigger and then use a ternary chain to return the data or error as needed:
If I adjust the fooQuery to return Promise.all instead of Promise.reject:
ETA: I noticed an odd thing when switching between fooQuery return values... The first run of the barQuery script produced a null return but then subsequent calls worked as intended. This is probably a promise/async thing that I didn't resolve properly in hasty sample setup.

