From b74815d41b2737615b80851a03e85af8648f28b0 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 20 Jan 2022 14:27:43 +0000 Subject: [PATCH] Add URL to error objects --- packages/frontend-core/src/api/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/frontend-core/src/api/index.js b/packages/frontend-core/src/api/index.js index 9c4713daa8..8fb61c9edb 100644 --- a/packages/frontend-core/src/api/index.js +++ b/packages/frontend-core/src/api/index.js @@ -45,6 +45,7 @@ export const createAPIClient = config => { return { message, status: response.status, + url: response.url, } } @@ -53,6 +54,7 @@ export const createAPIClient = config => { return { message, status: 400, + url: "", } } @@ -147,6 +149,7 @@ export const createAPIClient = config => { get: requestApiCall("GET"), patch: requestApiCall("PATCH"), delete: requestApiCall("DELETE"), + put: requestApiCall("PUT"), error: message => { throw makeError(message) },