Skip to content

Commit d15b9aa

Browse files
feat: Fix validation to skip unrelated stacks with missing metadata for Render datasource (#817)
Fixes #816.
1 parent a11f9a9 commit d15b9aa

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/datasource/render/frontend.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,16 @@ function parseOwnerInfo(obj: any): OwnerInfo {
124124

125125
for (const stackObj of stackObjs) {
126126
const stackName = verifyObjectProperty(stackObj, "stackId", parseStackName);
127-
const stackInfo = parseStackInfo(stackObj);
128-
127+
let stackInfo: StackInfo | undefined;
128+
try {
129+
stackInfo = parseStackInfo(stackObj);
130+
} catch (e) {
131+
console.warn(
132+
`Failed to parse stack info for stack ${stackName} in owner ${owner}:`,
133+
e,
134+
);
135+
continue;
136+
}
129137
if (stackInfo !== undefined) {
130138
const projectName = stackInfo.project;
131139
let projectInfo = projects.get(projectName);

0 commit comments

Comments
 (0)