Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix: preserve shared feedback errors

Richie McIlroy4ddc4a50cdb9
diff --git a/apps/web/app/api/mobile/[...route]/route.ts b/apps/web/app/api/mobile/[...route]/route.ts
index feb2b0f9d..b144c0e22 100644
--- a/apps/web/app/api/mobile/[...route]/route.ts
+++ b/apps/web/app/api/mobile/[...route]/route.ts
@@ -874,7 +874,11 @@ const assertCanCreateFeedback = Effect.fn("Mobile.assertCanCreateFeedback")(
if (row.ownerId === user.id) return;
if (row.sharedOrganizationId) {
yield* assertOrganizationAccess(row.sharedOrganizationId).pipe(
- Effect.catchAll(() => Effect.fail(new HttpApiError.NotFound())),
+ Effect.catchAll((error) =>
+ error instanceof HttpApiError.Forbidden
+ ? Effect.fail(new HttpApiError.NotFound())
+ : Effect.fail(error),
+ ),
);
return;
}