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
agartha
10/30/2017, 9:55 AM
return { error: .... }
👍 1
k
Kat
10/30/2017, 10:00 AM
ended up just setting up a new promise but thanks!