From cd4f5e5adb3f0003129c15de37259e8f90f0d6ee Mon Sep 17 00:00:00 2001 From: George Gevoian Date: Tue, 5 Dec 2023 03:15:09 -0500 Subject: [PATCH] (core) Trigger email verification flow when needed Summary: When an unconfirmed user tries to sign in or reset their password, the email verification flow is now automatically restarted. Prior to this change, an unconfirmed user error was shown in the client. Test Plan: Deployment tests. Reviewers: paulfitz, dsagal Reviewed By: dsagal Subscribers: dsagal Differential Revision: https://phab.getgrist.com/D4133 --- app/common/ApiError.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/common/ApiError.ts b/app/common/ApiError.ts index 568f2d15..ac799494 100644 --- a/app/common/ApiError.ts +++ b/app/common/ApiError.ts @@ -23,6 +23,8 @@ export interface ApiLimit { * Structured details about an API error. */ export interface ApiErrorDetails { + code?: ApiErrorCode; + limit?: ApiLimit; // If set, this is the more user-friendly message to show to the user than error.message. @@ -34,6 +36,9 @@ export interface ApiErrorDetails { memos?: string[]; } +export type ApiErrorCode = + | 'UserNotConfirmed'; + /** * An error with an http status code. */