Commit Graph

18 Commits

Author SHA1 Message Date
Gabe Mendoza
02c3c69ced
fix: backport allowAbsoluteUrls vuln fix to v0.x (#6829)
* allowAbsoluteUrls

* fix logic - copied from v1.x

* update string

* undo changes to dist/axios.js

* chore: use strict equal in lib/core/buildFullPath.js

---------

Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-03-19 12:24:25 +02:00
Willian Agostini
80b546c3f1
fix: loosing request header (#4858) (#4871)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-09-26 21:05:57 +02:00
Koki Oyatsu
2f50c8249b
Adding HTTP status code for transformResponse (#4580)
* Adding HTTP status code for transformResponse

* refs #1214

* Fix wrong argument for tranformResponse

* Fix test wrong argument for tranformData

* Add test case for transformData

* Add test case for transformData (reference headers case)

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-09 19:25:16 +02:00
Des Preston
7920d11144
Updating AxiosError to include stack trace (#4624)
Related to discussions here https://github.com/axios/axios/issues/2387

Attempt to capture the stack trace at the time the error is created in
order to maintain context about where the error originates from.

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-03 18:46:10 +02:00
DigitalBrainJS
7f1236652a Refactored AxiosError to a constructor;
Refactored `Cancel` to a constructor, a subclass of the `AxiosError`;
Expose CanceledError class;
Refactored axios error codes;
Added `toFlatObject` util;
2021-10-14 19:15:16 +03:00
Greg Byrne
cd7ff042b0
Adding HTTP status code to error.toJSON (#2956)
* Adding HTTP status code to error.toJSON (axios#2947)

* Adding Error display div to internal server client.html

Co-authored-by: Jay <jasonsaayman@gmail.com>
2021-09-05 13:45:24 +02:00
Xianming Zhong
0d69a79c81
Refactor mergeConfig without utils.deepMerge (#2844)
* Adding failing test

* Fixing #2587 default custom config persisting

* Adding Concat keys and filter duplicates

* Fixed value from CPE

* update for review feedbacks

* no deepMerge

* only merge between plain objects

* fix rename

* always merge config by mergeConfig

* extract function mergeDeepProperties

* refactor mergeConfig with all keys, and add special logic for validateStatus

* add test for resetting headers

* add lots of tests and fix a bug

* should not inherit `data`

* use simple toString

* revert #1845

Co-authored-by: David Tanner <david.tanner@lifeomic.com>
Co-authored-by: Justin Beckwith <justin.beckwith@gmail.com>
2020-06-08 20:52:45 +02:00
Xianming Zhong
2034c1db7e
Fix tests in browsers (#2748) 2020-02-15 15:54:43 +08:00
Jonathan Sharpe
77f0ae4f61
Fix merging of params (#2656)
* Name function to avoid ESLint func-names warning

* Switch params config to merge list and update tests

* Restore testing of both false and null

* Restore test cases for keys without defaults

* Include test for non-object values that aren't false-y.
2020-02-15 13:36:52 +08:00
Rafael Renan Pacheco
a11cdf4683 Fixing custom config options (#2207)
- fixes #2203
2019-09-06 21:40:04 -03:00
DIO
89bd3abe9a Axios create url bug (#2290)
* Fix #2234 

* added spacing --eslint

* added test cases

* removed unexpected cases after updating the code
2019-09-06 12:45:18 -03:00
multicolaure
6fe506fda2 Do not modify config.url when using a relative baseURL (resolves #1628) (#2391)
* Adding tests to show config.url mutation

Because config.url is modified while processing the request
when the baseURL is set,
it is impossible to perform a retry with the provided config object.

Ref #1628

* Fixing url combining without modifying config.url

As config.url is not modified anymore during the request processing.
The request can safely be retried after it failed with the provided
config.

resolves #1628
2019-09-05 12:43:55 -03:00
Ayush Gupta
b681e919c4 Adding isAxiosError flag to errors thrown by axios (#1419) 2018-08-20 11:02:23 +02:00
Tim Johns
6b44e80ade Added toJSON to decorated Axios errors to faciliate serialization (#1625) 2018-08-06 23:33:55 -06:00
Martti Laine
143bbbe1b9 Spec for mergeConfig, finalize logic 2018-04-07 15:54:56 +02:00
Rubén Norte
e0d59eb29b Adding failing tests that verify errors contain the request 2017-04-08 21:43:04 +02:00
Nick Uraltsev
91dae3c4ad Improve error handling 2016-06-13 13:56:08 -07:00
Matt Zabriskie
203cbc2da0 Moving settle & transformData from helpers/ -> core/ 2016-06-01 13:54:38 -06:00