mirror of
https://github.com/tenrok/axios.git
synced 2026-06-17 19:21:29 +03:00
e04ee42a67
error.status is set to response.status when a response is available, and is undefined for network-level errors that have no HTTP response. Add an inline comment in the constructor clarifying this contract, and add four regression tests for issue #5330 covering: - 4xx errors (error.status === response.status) - 5xx errors - network errors (error.status is undefined) - toJSON includes the status field Fixes #5330 Co-authored-by: AKIBUZZAMAN AKIB <akibuzzamanakib473@gmail.com> Co-authored-by: Jay <jasonsaayman@gmail.com>