From 94b3bc084a4e38da466373884f5124c5e4f0fd95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marti=CC=81n=20M?= Date: Wed, 21 Oct 2020 19:58:51 -0300 Subject: [PATCH] makeRequest: improved error message --- src/mixins/makeRequest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mixins/makeRequest.js b/src/mixins/makeRequest.js index 99c5240..f93abd3 100644 --- a/src/mixins/makeRequest.js +++ b/src/mixins/makeRequest.js @@ -46,7 +46,7 @@ module.exports = { /** Catch request status code other than 200 */ if (!request.ok) { - throw new Error(`Error ${request.status}: ${errors[request.status]}`); + throw new Error(`[${request.status}] ${errors[request.status]}`); } /** Parse API response */