mirror of
https://github.com/tenrok/axios.git
synced 2026-06-08 17:22:34 +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);
|
||||
|
||||
if (Error.captureStackTrace) {
|
||||
Error.captureStackTrace(this);
|
||||
Error.captureStackTrace(this, this.constructor);
|
||||
} else {
|
||||
this.stack = (new Error()).stack;
|
||||
}
|
||||
|
||||
this.message = message;
|
||||
|
||||
Reference in New Issue
Block a user