So when the api you are calling from within the function is offline, it fails to fetch, and the work
So when the api you are calling from within the function is offline, it fails to fetch, and the worker is just returning 500 because the response never exists.
If this is the case then I think you can use a .catch() after the fetch and put a callback that returns whatever error you want your function to return when that happens.
If this is the case then I think you can use a .catch() after the fetch and put a callback that returns whatever error you want your function to return when that happens.
