mirror of
https://github.com/tenrok/axios.git
synced 2026-06-23 20:40:40 +03:00
Fixed AxiosError stack capturing; (#4718)
Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
@@ -16,7 +16,9 @@ function AxiosError(message, code, config, request, response) {
|
|||||||
Error.call(this);
|
Error.call(this);
|
||||||
|
|
||||||
if (Error.captureStackTrace) {
|
if (Error.captureStackTrace) {
|
||||||
Error.captureStackTrace(this);
|
Error.captureStackTrace(this, this.constructor);
|
||||||
|
} else {
|
||||||
|
this.stack = (new Error()).stack;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.message = message;
|
this.message = message;
|
||||||
|
|||||||
Reference in New Issue
Block a user