graphile / starter

Opinionated SaaS quick-start with pre-built user account and organization system for full-stack application development in React, Node.js, GraphQL and PostgreSQL. Powered by PostGraphile, TypeScript, Apollo Client, Graphile Worker, Graphile Migrate, GraphQL Code Generator, Ant Design and Next.js
https://graphile-starter.herokuapp.com
Other
1.74k stars 219 forks source link

fix: `/settings` page - incorrect errorcode checked #283

Closed JonParton closed 2 years ago

JonParton commented 2 years ago

Description

On the /settings page the error for the username being unique is not currently being handled correctly.

The check on errors coming back from Apollo is checking for the error code 23505 but it is actually being rewritten as NUNIQ and so does not match.

The error codes are stated in the error_codes.md file, replaced using the handleErrors.ts file and I can also confirm I am physically seeing NUNIQ being returned when using the starter.

Performance impact

None

Security impact

None

Checklist