Skip to content

Commit 97ea77b

Browse files
authored
Merge pull request #980 from constructive-io/devin/1776247185-safe-error-codes
feat: add missing SAFE_ERROR_CODES for rate limiting and auth errors
2 parents 8a4291a + 8aab1a4 commit 97ea77b

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

graphql/server/src/middleware/graphile.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,19 @@ const SAFE_ERROR_CODES = new Set([
3636
'INVITE_LIMIT',
3737
'INVITE_EMAIL_NOT_FOUND',
3838
'INVALID_CREDENTIALS',
39+
// CSRF
40+
'CSRF_TOKEN_REQUIRED',
41+
'INVALID_CSRF_TOKEN',
42+
// Rate limiting / throttling
43+
'TOO_MANY_REQUESTS',
44+
'PASSWORD_RESET_LOCKED_EXCEED_ATTEMPTS',
45+
// TOTP
46+
'TOTP_NOT_ENABLED',
47+
// Account / resource operations
48+
'NULL_VALUES_DISALLOWED',
49+
'OBJECT_NOT_FOUND',
50+
'LIMIT_REACHED',
51+
'REQUIRES_ONE_OWNER',
3952
// PublicKeySignature
4053
'FEATURE_DISABLED',
4154
'INVALID_PUBLIC_KEY',

0 commit comments

Comments
 (0)