fix: gate scrollbar resize guard on size, preserve parse causes

Address CodeRabbit review on #6510:
- gridstack: only suppress recalculation when the width delta is
  insignificant AND (non-dynamic OR height unchanged), so dynamic
  sections still rebuild on height changes
- beszel: propagate the response parse failure via { cause } in both
  error wrappers
- auth tests: cover invalid (non-string) OIDC groups claims
This commit is contained in:
ajnart committed 2026-08-08 11:35:42 +02:00
1 parent e0ebdd9047
commit 71b986f249
3 files changed
+44 -11

No files matched your search

@@ -171,9 +171,11 @@ export class BeszelIntegration extends Integration {
integrationId: this.integration.id,
error: error instanceof Error ? error.message : String(error),
});
throw new ErrorWithMetadata("Beszel authentication response was not valid JSON", {
integrationId: this.integration.id,
});
throw new ErrorWithMetadata(
"Beszel authentication response was not valid JSON",
{ integrationId: this.integration.id },
{ cause: error instanceof Error ? error : new Error(String(error)) },
);
}
const expiresAt = parseTokenExpiration(data.token) ?? undefined;
@@ -626,7 +628,11 @@ export class BeszelIntegration extends Integration {
logger.warn("Failed to parse Beszel testing response JSON", {
error: error instanceof Error ? error.message : String(error),
});
return TestConnectionError.ParseResult(new ParseError("Beszel testing response was not valid JSON"));
return TestConnectionError.ParseResult(
new ParseError("Beszel testing response was not valid JSON", {
cause: error instanceof Error ? error : new Error(String(error)),
}),
);
}
if (!data.token) {
return TestConnectionError.UnauthorizedResult(401);