Javascript : How to get result from axios request error? [duplicate]

I want to get result from the axios function, but not only when request is success, but also if failed.
How to make result as that err data? I know this is a sort of promise function, but this doesn’t work.

router.get('/test', async (req, res) =>{
  let result = await axios.get('a/specific/url').catch((err) => {
    Promise.resolve(err)
  })
  console.log('/test >>', result)
})