Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

address review: log operational failures separately from not-found

Olena Ponomarovadda7e28a17cf
diff --git a/apps/web/actions/videos/new-comment.ts b/apps/web/actions/videos/new-comment.ts
index 114f93a75..ea6a41ed1 100644
--- a/apps/web/actions/videos/new-comment.ts
+++ b/apps/web/actions/videos/new-comment.ts
@@ -55,7 +55,12 @@ export async function newComment(data: {
).pipe(Policy.withPublicPolicy(videosPolicy.canView(videoId)));
}).pipe(provideOptionalAuth, EffectRuntime.runPromiseExit);
- if (Exit.isFailure(accessExit) || accessExit.value.length === 0) {
+ if (Exit.isFailure(accessExit)) {
+ console.error("Video access check failed:", accessExit);
+ throw new Error("Video not found");
+ }
+
+ if (accessExit.value.length === 0) {
throw new Error("Video not found");
}