From f46df0c91a80c9f3e2b5e69de297a7a7bf1a9b54 Mon Sep 17 00:00:00 2001 From: Roni Choudhury Date: Thu, 18 Mar 2021 16:25:16 -0400 Subject: [PATCH] Return the full axios error on failure --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 941192b..5736f11 100644 --- a/src/index.ts +++ b/src/index.ts @@ -126,7 +126,7 @@ function fileToText(file: File): Promise { function extract(promise: AxiosPromise): Promise { return new Promise((resolve, reject) => { promise.then((resp) => resolve(resp.data)) - .catch((err) => reject(err.response)); + .catch((err) => reject(err)); }); }