pelogvc/tor-axios

Error handling

Closed this issue · 1 comments

Errors are handled differently than axios

An example:

try {
  let response = await tor_axios.get('some url');
} catch(error) {
  console.log(error);
}

error is expected to be an object with a status and a data properties, instead it is a string containing
Error: Request failed with status code 404

solved thx