From fc1ad28f32853ed58aab94176fda7754847e3614 Mon Sep 17 00:00:00 2001 From: Igor Date: Mon, 18 Sep 2023 13:40:54 +0300 Subject: [PATCH] Do not wrap factory resolver rquest exception Signed-off-by: Igor --- .../factoryResolverApi.ts | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/packages/dashboard-frontend/src/services/dashboard-backend-client/factoryResolverApi.ts b/packages/dashboard-frontend/src/services/dashboard-backend-client/factoryResolverApi.ts index 3f2f5016f..bace20774 100644 --- a/packages/dashboard-frontend/src/services/dashboard-backend-client/factoryResolverApi.ts +++ b/packages/dashboard-frontend/src/services/dashboard-backend-client/factoryResolverApi.ts @@ -11,7 +11,6 @@ */ import axios from 'axios'; -import { helpers } from '@eclipse-che/common'; import { cheServerPrefix } from './const'; import { FactoryResolver } from '../helpers/types'; @@ -21,14 +20,10 @@ export async function getFactoryResolver( url: string, overrideParams: { [params: string]: string } = {}, ): Promise { - try { - const response = await axios.post( - `${cheServerPrefix}${factoryResolverEndpoint}`, - Object.assign({}, overrideParams, { url }), - ); + const response = await axios.post( + `${cheServerPrefix}${factoryResolverEndpoint}`, + Object.assign({}, overrideParams, { url }), + ); - return response.data; - } catch (e) { - throw new Error(`Failed to fetch factory resolver'. ${helpers.errors.getMessage(e)}`); - } + return response.data; }