removed toJSON check

This commit is contained in:
Daniel Pyrathon 2020-08-14 16:29:52 -07:00
parent d22c0641fb
commit 39e157499d

View File

@ -86,7 +86,7 @@ function hasExpectedAssetData(
}
function convertIfAxiosError(error: any): Error | object /* axios' .d.ts has AxiosError.toJSON() returning object */ {
if (error.hasOwnProperty('isAxiosError') && error.isAxiosError && error.hasOwnProperty('toJSON')) {
if (error.hasOwnProperty('isAxiosError') && error.isAxiosError) {
const { message, name, config } = error;
const { headers, timeout, httpsAgent } = config;
const { keepAlive, keepAliveMsecs, sockets } = httpsAgent;