asset-s/QuoteRequestor: clarify axios error type

Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2581#discussion_r423337773
This commit is contained in:
F. Eugene Aumson
2020-05-11 18:34:32 -04:00
parent c929782e0d
commit dede076835

View File

@@ -80,7 +80,7 @@ function hasExpectedAssetData(
return hasExpectedMakerAssetData && hasExpectedTakerAssetData;
}
function convertIfAxiosError(error: any): Error {
function convertIfAxiosError(error: any): Error | object /* axios' .d.ts has AxiosError.toJSON() returning object */ {
if (error.hasOwnProperty('isAxiosError') && error.isAxiosError && error.hasOwnProperty('toJSON')) {
return error.toJSON();
} else {