Try this on your GraphQL API: sign up twice with the same email.
On a lot of TypeScript + Postgres backends you get one of two responses.
Mode 1: the leak.
{ "errors" : [{ "message" : "duplicate key value violates unique constraint \" users_email_key \" " , "extensions" : { "code" : "INTERNAL_SERVER_ERROR" } }], "data" : null }
Enter fullscreen mode
Exit fullscreen mode
Your table name, your constraint name, and a hint about your schema, sent to anyone who asks. And the client still can't act on it, because the code says "internal server error" for what is really "that email is taken".
Mode 2: the mask. Someone noticed Mode 1 and added a formatError that replaces every message with "Internal server error" . Now nothing leaks, but the signup form shows "Something went wrong" for a duplicate email, an invalid input, a missing record and an actual outage alike.…