New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better error message for missing url #3110
Comments
Closed by #3791 |
Reproducible in 1.4.0 (
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
The error that occurs when making an axios request with a
url
that is undefined is unclear. This is problematic because I often write code that programmatically generates the url for the request, or uses the response from a previous request to compose the next request.Describe the solution you'd like
If a url is falsey in the request config, throw a very clear error that indicates that no url was provided
Describe alternatives you've considered
Making sure I write better code that doesn't generate
undefined
urlsAdditional context
This is the error generated currently
Uncaught (in promise) TypeError: can't access property "protocol", n is undefined
, which is not the most helpful in terms of pinpointing the issue.The text was updated successfully, but these errors were encountered: