mirror of
https://github.com/Drop-OSS/drop.git
synced 2026-07-24 20:05:39 -04:00
[GH-ISSUE #253] [BUG] Unhandled Prisma Error Causes Server Crash When Deleting a Non-Existent Notification #128
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dustin2398 on GitHub (Sep 14, 2025).
Original GitHub issue: https://github.com/Drop-OSS/drop/issues/253
Describe the bug
The server crashes with an unhandled database error when a client tries to delete a notification that has already been deleted or no longer exists. This makes the entire server unreachable until it is manually restarted.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The server should handle the error gracefully. If a request is made to delete a notification that doesn't exist, the server should simply ignore it or return a
404 Not Founderror without crashing the application.Screenshots
N/A - This is a server-side crash. The relevant information is in the logs under "Additional context".
Desktop (please complete the following information):
Additional context
The following error is captured from the Docker container logs, which shows an unhandled
PrismaClientKnownRequestErrorwith codeP2025.@DecDuck commented on GitHub (Sep 25, 2025):
For developer reference on how to fix this, the endpoint should use
deleteManyand then check that a record has been deleted, rather than using the frankly awfuldeletefunction.[BUG] Unhandled Prisma Error Causes Server Crash When Deleting a Non-Existent Notificationto [GH-ISSUE #253] [BUG] Unhandled Prisma Error Causes Server Crash When Deleting a Non-Existent Notification