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
getBy queries throw an error whereas findBy queries reject a Promise.
This means we try-catch the query and chain a catch onto the promise
chain in order to handle both cases.
Instead we can use an async IIFE and try-catch the result of the query.
This handles both cases at once and allows us to flatten as an added
benefit.
0 commit comments