question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BREAKING 0.19 API Errors not populating correctly

See original GitHub issue

API Error breaks existing code. The error object is no longer populated.

To Reproduce catch an error from an api.

Expected behavior I didn’t expect a minor version change to break existing code.

Is there any further guidance or documentation regarding these changes?

  • Makes Axios error generic to use AxiosResponse (#1738) - Suman Lama
  • Adding isAxiosError flag to errors thrown by axios (#1419) - Ayush Gupta

Environment:

  • Axios Version [0.19.0]
  • OS: [Windows 10 ]
  • Browser [ Chrome ]
  • Browser Version [75.0.3770.80 (Official Build) (64-bit)]
  • Additional Library Versions [React 16.8.6]

Additional context/Screenshots const apirequest = (options) => { return authService.fetchAccessToken() .then((accessToken) => { if (!options.headers) options.headers = {};

  options.headers['Authorization'] = `bearer ${accessToken}`;

  return client(options)
    .then(response => {
      return response.data;
    })
    .catch(error => { console.error(error); });
});

}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:7
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
danielmcqcommented, Jun 16, 2019

Not trying to be pedantic, but you should never expect a module with a major version “0” to have a stable API. Until the author(s) put it at 1, it’s not considered stable. https://semver.org/#spec-item-4

1reaction
chinesedfancommented, Feb 29, 2020

Closed due to lack of enough information and stale. Nobody gives a reproducible code example.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Axios requests not working after update from 0.19.0 to 0.21.1
Describe the issue after updating axios from 0.19 to 0.21.1 I figure ... Also, the way axios handles error responses is a breaking...
Read more >
Elm 0.19 Broke Us - DEV Community ‍ ‍
Elm 0.19 was released yesterday. There were a significant number of breaking changes at every level: configuration, tooling, library, ...
Read more >
SciPy 0.19.0 Release Notes — SciPy v1.9.3 Manual
SciPy 0.19.0 is the culmination of 7 months of hard work. It contains many new features, numerous bug-fixes, improved test coverage and better...
Read more >
Troubleshooting App Deployment Errors - Dash Python
This troubleshooting guide describes errors that you may encounter when deploying apps to Dash Enterprise as well as steps to resolve them.
Read more >
YouTube Data API - Errors | Google Developers
This document identifies the different types of errors that YouTube Data API operations can return. You can also find a list of errors...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found