From 5117430b16c2f741b09702058a26d52aaafdaebe Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Thu, 20 Oct 2022 16:36:03 +0200 Subject: [PATCH] fix(deno-client): error handling for getInternalState --- deno-client/mod.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deno-client/mod.ts b/deno-client/mod.ts index 838b3a7a14..40b03ec8ef 100644 --- a/deno-client/mod.ts +++ b/deno-client/mod.ts @@ -43,8 +43,8 @@ export async function getResource(path: string, undefinedIfEmpty?: boolean): Pro try { const resource = await ResourceService.getResource({ workspace, path }) return await _transformLeaf(resource.value) - } catch (e) { - if (undefinedIfEmpty && e.code === 404) { + } catch (e: any) { + if (undefinedIfEmpty && e.status === 404) { return undefined } else { throw e