You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Prisma P2002: "Unique constraint failed on the {constraint}"
375
373
case'P2002':
@@ -401,7 +399,7 @@ And that's all it takes to create a well-defined documentation for our API.
401
399
402
400
<imgclass="-png"src="/blog/with-prisma/swagger.webp"alt="Swagger documentation generated by Elysia" />
403
401
404
-
And thanks to defining a strict type for the documentation, we found that we accidentally returns`password` field from our API which is not a good idea to return a private information.
402
+
And thanks to defining a strict type for the documentation, we found that we accidentally return`password` field from our API which is not a good idea to return a private information.
405
403
406
404
Thanks to Elysia's type system, we define that response shouldn't contains `password` which automatically warn us that our Prisma query are returning a password allows us to fix that a head of time.
0 commit comments