It will be caused by using try catch with await inside of your callback for your middleware. You can either use a self invoked function like in the answer from @Andrew or you can handle it aswell like this:
// Sample route to trigger HttpClientError
app.get('/httpclient-error', (): void => {
axios.get(`${BASE_URL}/notFound`)
.then(() => {
// handle successful response
})
.catch((e: AxiosError) => {
throw new HttpClientError(errorMessage, e)
})
})