//Works
const fetchHEAD = () => (
got.head(url, Object.assign({ }, opts, {
retry: { retries: 0 }
}))
.then((res) => ({
status: 'alive',
statusCode: res.statusCode
}))
)
return fetchHEAD();
//Does not work
const fetchHEAD = () => (
try {
const result = got.head(url, opts, {
retry: { retries: 0 }
});
} catch (error) {
}
)
return fetchHEAD();