invoke function catches the error (and then populates error instead of data)throw new Error('some error') instead of returning a response, I get a CORS Policy block. So it seems like I must return a response with my CORS headers, but then I'm not sure how to return an error at that point?