From aed51a2bc5336a5349914c3bb0c7989a9f0b05b1 Mon Sep 17 00:00:00 2001 From: Pugazhendhi Date: Mon, 27 Jan 2025 10:49:41 +0530 Subject: [PATCH] Updates error reading --- src/api/providers/unbound.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/providers/unbound.ts b/src/api/providers/unbound.ts index c88e034..91eba17 100644 --- a/src/api/providers/unbound.ts +++ b/src/api/providers/unbound.ts @@ -28,7 +28,7 @@ export class UnboundHandler implements ApiHandler { const data = await response.json() if (!response.ok) { - throw new Error(data.error) + throw new Error(data.error.message) } yield { @@ -42,7 +42,7 @@ export class UnboundHandler implements ApiHandler { } } catch (error) { if (error instanceof Error) { - throw new Error(`Unbound Gateway completion error: ${error.message}`) + throw new Error(`Unbound Gateway completion error:\n ${error.message}`) } throw error }