vimo
CDCloudflare Developers
•Created by vimo on 4/15/2024 in #functions
Thanks for still thinking about it.
@IEatBeans Sorry to tag you but I wanted to notify you of this thread I am creating.
I cannot share the code snippet as such as I am not sure I know how to share a code snippet that would make sense 😛 But herees a psuedo code explaining that problem.
Now the problem with 500 internal error is that if hello.js can't fetch from the originurl (only when the originurl is down or inaccessible), it doesn't throw that error to be caught in the catch block for me. It just returns 500 internet error on the server side instead as the try catch block is only to look for fetch errors from the originurl. But the way functions works, it seems if originurl doesn't respond, the function errors out completely, like it terminates itself. So I can't handle inside the function. The only way to do that is to handle the possible function error on the frontend.
3 replies