.catch() running with nothing returned

Thanks for the reponse @russian-dima . I changed the OR part of the query to let and played with swapping where the “await” sits.

I also added the additional returns with no effect.

Particularly, the .catch( (err) ) still triggers despite the (err) being undefined when I log it.

For my own understanding as I am struggling with how to make promise logic work:

  1. why would the change to “let” make a difference?

  2. why would there be a requirement to change that part of the query to “await”? I see you simply swap where you make it “await”
    myQuery is syntax only to make the fully built query more readable unless I am mistaken.