sharma
07/19/2022, 1:30 PMsupertokensEmailPassword.signUp
, is the returned promise rejected in case of FIELD_ERROR?
Initially I wrote the code inside .catch to deal with FIELD_ERROR but on debugging found that the code does not reach .catch
, but it is inside .then
.
Is it intended?rp
07/19/2022, 1:32 PMsharma
07/19/2022, 1:34 PMPromise<{ fetchResponse: Response; status: "OK"; user: UserType } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>
Which means
resolved - { fetchResponse: Response; status: "OK"; user: UserType }
rejected - { error: string; id: string }[]; status: "FIELD_ERROR" }
rp
07/19/2022, 2:16 PMsharma
07/19/2022, 2:19 PMrp
07/19/2022, 2:19 PMsharma
07/19/2022, 2:21 PMrp
07/19/2022, 2:22 PM