mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-20 08:01:35 +00:00
fix(deno-client): error handling for getInternalState
This commit is contained in:
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user