Estoy tratando de encontrar la fuente del tipo de error de respuesta. ¿Qué paquete debo instalar para manejar este tipo de errores?
import Error from '??'; export const fetchList = createAsyncThunk( 'list-get', async () => { try { const response = await doFetch(..); return response.data } catch (error: Error) { if(error.response.status === 0 ){ doHandling(); } else throw error; } } )No hay ningún tipo desde el que importar. el tipo de error debe ser unknown , no Error, ya que podemos arrojar todo.