500 responses send Prisma's error text to the client
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 55/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- typescript
Rechercherichtung
Start by reading ErrorHandler and the PrismaClientKnownRequestError branch, then inspect StudiesController.ts for plain Errors whose messages are intended for users. Update the handling so client responses do not expose error details while user-facing messages use UnprocessableError; log errors server-side. Done means the described 500 responses no longer expose query data or internal error text.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
ErrorHandler ends with a catch-all that returns { message: 'Internal Server Error', details: err.message } for any error it doesn't recognise, so Prisma's own error text goes to the client. #880 sanitised the 422 ValidateError branch for #879, but not this one.
For example, PATCH /profiles/current with a key the request type allows but the profile table doesn't have, such as password, returns a 500 whose details is Prisma's dump of the query: the values sent, including the password, and every column the model accepts. logger.error writes the same text to the logs. The PrismaClientKnownRequestError branch returns err.meta as details for every code, and err.message for codes other than P2002 and P2025.
Fix: return a fixed message with no details from both branches, and log the error on the server instead. First turn the plain Errors that carry a message meant for users into UnprocessableError, such as "Study with that name already exists" in StudiesController.ts, because the admin portal shows that text from the 500's details today.
Related: #879, #880, #418, #919, #943.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 4
- Forks
- 0
- Ø Merge
- 14 Std. 50 Min.
- Gemergte PRs (30 T.)
- 5
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus Garvan-Data-Science-Platform/ctrl
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 82/100
-
admin-client backend bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
-
backend bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Garvan-Data-Science-Platform/ctrl#970 · 1 Kommentar ·
-
backend bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
-
backend bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Alle Issues in Garvan-Data-Science-Platform/ctrl
Ähnliche Issues
-
documentation good first issue
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 72/100
sujithputta02/Esapay#13 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
ehmpathy/rhachet-roles-bhuild#468 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Share dialog: the address book's contact count reads "1 contacts" (no singular form in any language)Evtl. vergeben @chibenwa hat das heute übernommen. Offenai-driven-qa bug claude Cosmetic
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
linagora/twake-contacts-frontend#271 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
factory-active task-identify-harness-labels-done task-identify-issue-type-done
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 70/100
vercel/ai#23435 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Koenkk/zigbee2mqtt#33402 ·
Maintainer antworten meist innerhalb von 1 Tag