Update browse.router.ts

This commit is contained in:
Enrico Ros
2025-03-19 09:33:33 -07:00
committed by GitHub
parent 8f6ebe8301
commit a05110cd93
+7 -1
View File
@@ -97,7 +97,13 @@ export const browseRouter = createTRPCRouter({
title: '',
content: undefined,
file: undefined,
error: result.reason?.message || 'Unknown fetch error',
error: typeof result.reason === 'string'
? result.reason
: result.reason instanceof Error
? result.reason.message
: result.reason
? JSON.stringify(result.reason)
: 'Unknown fetch error',
stopReason: 'error',
screenshot: undefined,
} satisfies FetchPageWorkerOutputSchema;