sharma8471
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_st
07/19/2022, 1:32 PMrp_st
07/19/2022, 1:32 PMsharma8471
07/19/2022, 1:34 PMsharma8471
07/19/2022, 1:35 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" }
sharma8471
07/19/2022, 1:37 PMrp_st
07/19/2022, 2:16 PMrp_st
07/19/2022, 2:16 PMrp_st
07/19/2022, 2:16 PMsharma8471
07/19/2022, 2:19 PMrp_st
07/19/2022, 2:19 PMsharma8471
07/19/2022, 2:21 PMsharma8471
07/19/2022, 2:21 PMrp_st
07/19/2022, 2:22 PM