fix(deno-client): error handling for getInternalState

This commit is contained in:
Ruben Fiszel
2022-10-20 16:36:03 +02:00
parent 100761a15c
commit 5117430b16
+2 -2
View File
@@ -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