whats the correct way to return an error in a func...
# prisma-whats-new
k
whats the correct way to return an error in a function? I'm doing throw new Error('An unexpected error occured.') in my async function but it doesnt seem to hitting it.. just getting an error "Function returned invalid status code: 0. Raw body"
a
return { error: .... }
👍 1
k
ended up just setting up a new promise but thanks!
👍🏻 1