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
This issues is a follow up from PR #9288. For more context, check this conversation.
Issue
Currently, there is no type-safe mechanism for handling GraphQL error extensions codes on the frontend. This creates a risk of runtime errors and makes the code harder to maintain.
Context
In the handleChallenge function, an error code (EMAIL_NOT_VERIFIED) from the backend is used to redirect users to the email verification page. However, the implementation lacks type safety. Adding type safety will help ensure consistency and prevent errors when checking these codes.
Relevant code snippet from the current implementation:
References
This issues is a follow up from PR #9288. For more context, check this conversation.
Issue
Currently, there is no type-safe mechanism for handling GraphQL error extensions codes on the frontend. This creates a risk of runtime errors and makes the code harder to maintain.
Context
In the
handleChallenge
function, an error code (EMAIL_NOT_VERIFIED
) from the backend is used to redirect users to the email verification page. However, the implementation lacks type safety. Adding type safety will help ensure consistency and prevent errors when checking these codes.Relevant code snippet from the current implementation:
Proposed Solution
To address this, create a shared file to store error codes in the
twenty-shared
package. This will:The text was updated successfully, but these errors were encountered: