Skip to content

Commit 86bf08c

Browse files
committed
Fix s2 error handling for non-existing streams
1 parent 2e34da7 commit 86bf08c

File tree

1 file changed

+4
-1
lines changed
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam

1 file changed

+4
-1
lines changed

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,10 @@ export default function Page() {
137137
} catch (error) {
138138
if (abortController.signal.aborted) return;
139139

140-
const isNotFoundError = error instanceof S2Error && error.code === "stream_not_found";
140+
const isNotFoundError =
141+
error instanceof S2Error &&
142+
error.code &&
143+
["permission_denied", "stream_not_found"].includes(error.code);
141144
if (isNotFoundError) return;
142145

143146
console.error("Failed to stream logs:", error);

0 commit comments

Comments
 (0)