From 69c9b0ba772a5b68d9e6cc1fdd6c25fc628cd512 Mon Sep 17 00:00:00 2001 From: steveoh Date: Thu, 25 Jul 2024 12:55:33 -0600 Subject: [PATCH] fix(utilities): for historical changes --- packages/utilities/src/api.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/utilities/src/api.js b/packages/utilities/src/api.js index 6ca467de..e253d4fe 100644 --- a/packages/utilities/src/api.js +++ b/packages/utilities/src/api.js @@ -72,7 +72,7 @@ export const geocode = async ( } return { - status: error.response?.status, // response is undefined when got throws + status: error.response?.status, message: response?.error ?? response?.message, }; } @@ -119,7 +119,7 @@ export const search = async ( } return { - status: error.response?.status, // response is undefined when got throws + status: error.response?.status, message: response?.error ?? response?.message, }; }