diff options
| author | Adam <[email protected]> | 2025-12-30 10:27:06 -0600 |
|---|---|---|
| committer | Adam <[email protected]> | 2025-12-30 10:27:06 -0600 |
| commit | 9e9b4a0555d308718cd2cb62df66a37db593d7f1 (patch) | |
| tree | cff584e7dcdf88931563a0436e70d10fb0e7fff7 /packages/enterprise/src/routes/share | |
| parent | e53192889cb9f7c2554d0229df9f5b2c87786e43 (diff) | |
| download | opencode-9e9b4a0555d308718cd2cb62df66a37db593d7f1.tar.gz opencode-9e9b4a0555d308718cd2cb62df66a37db593d7f1.zip | |
fix(share): broken share pages
Diffstat (limited to 'packages/enterprise/src/routes/share')
| -rw-r--r-- | packages/enterprise/src/routes/share/[shareID].tsx | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/packages/enterprise/src/routes/share/[shareID].tsx b/packages/enterprise/src/routes/share/[shareID].tsx index c511a5ba5..3a3d580b2 100644 --- a/packages/enterprise/src/routes/share/[shareID].tsx +++ b/packages/enterprise/src/routes/share/[shareID].tsx @@ -162,11 +162,20 @@ export default function () { return ( <ErrorBoundary - fallback={(e) => { + fallback={(error) => { + if (SessionDataMissingError.isInstance(error)) { + return <NotFound /> + } + console.error(error) + const details = error instanceof Error ? (error.stack ?? error.message) : String(error) return ( - <Show when={e.message === "SessionDataMissingError"}> - <NotFound /> - </Show> + <div class="min-h-screen w-full bg-background-base text-text-base flex flex-col items-center justify-center gap-4 p-6 text-center"> + <p class="text-16-medium">Unable to render this share.</p> + <p class="text-14-regular text-text-weaker">Check the console for more details.</p> + <pre class="text-12-mono text-left whitespace-pre-wrap break-words w-full max-w-200 bg-background-stronger rounded-md p-4"> + {details} + </pre> + </div> ) }} > |
