Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix(notifications): return HTTP 500 status code instead of embedding in JSON body

Richie McIlroy080c81f455c5
diff --git a/apps/web/app/api/notifications/route.ts b/apps/web/app/api/notifications/route.ts
index b119a17a8..e75a75332 100644
--- a/apps/web/app/api/notifications/route.ts
+++ b/apps/web/app/api/notifications/route.ts
@@ -143,9 +143,9 @@ export async function GET() {
});
} catch (error) {
console.error("Error fetching notifications:", error);
- return NextResponse.json({
- status: 500,
- error: "Failed to fetch notifications",
- });
+ return NextResponse.json(
+ { error: "Failed to fetch notifications" },
+ { status: 500 },
+ );
}
}