-
-
Notifications
You must be signed in to change notification settings - Fork 11.6k
The irrelevant error returned when requesting illegal URL #3509
Copy link
Copy link
Closed
Description
Describe the bug
The irrelevant error returned when requesting illegal URL, like: "tel:484-695-3408"
TypeError: Cannot read property 'replace' of null
at dispatchHttpRequest (node_modules/axios/lib/adapters/http.js:109:74)
at new Promise (<anonymous>)
at httpAdapter (node_modules/axios/lib/adapters/http.js:46:10)
at dispatchRequest (node_modules/axios/lib/core/dispatchRequest.js:52:10)
To Reproduce
axios.get('tel:484-695-3408').catch(err => console.error(err));Expected behavior
Return descriptive error, like "Unsupported protocol tel:"
Environment
- Axios Version: 0.21.1
- Adapter: HTTP
- Browser: none
- Browser Version: none
- Node.js Version: 12.19.0
- OS: MacOS 10.14
- Additional Library Versions: none
Additional context/Screenshots
none
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels