diff --git a/v2/thirdparty/common-customizations/deduplication/implementing-deduplication.mdx b/v2/thirdparty/common-customizations/deduplication/implementing-deduplication.mdx index 72cb13ba9..eff7bb1ad 100644 --- a/v2/thirdparty/common-customizations/deduplication/implementing-deduplication.mdx +++ b/v2/thirdparty/common-customizations/deduplication/implementing-deduplication.mdx @@ -129,7 +129,7 @@ func main() { resp, err := originalSignInUpPOST(provider, input, tenantId, options, userContext) - if err.Error() == "Cannot sign up as email already exists" { + if err != nil && err.Error() == "Cannot sign up as email already exists" { // this error was thrown from our function override above. // so we send a useful message to the user return tpmodels.SignInUpPOSTResponse{ diff --git a/v2/thirdpartyemailpassword/common-customizations/deduplication/implementing-deduplication.mdx b/v2/thirdpartyemailpassword/common-customizations/deduplication/implementing-deduplication.mdx index af2d78142..edf18a975 100644 --- a/v2/thirdpartyemailpassword/common-customizations/deduplication/implementing-deduplication.mdx +++ b/v2/thirdpartyemailpassword/common-customizations/deduplication/implementing-deduplication.mdx @@ -193,7 +193,7 @@ func main() { resp, err := originalSignInUpPOST(provider, input, tenantId, options, userContext) - if err.Error() == "Cannot sign up as email already exists" { + if err != nil && err.Error() == "Cannot sign up as email already exists" { // this error was thrown from our function override above. // so we send a useful message to the user return tpmodels.SignInUpPOSTResponse{ diff --git a/v2/thirdpartypasswordless/common-customizations/deduplication/implementing-deduplication.mdx b/v2/thirdpartypasswordless/common-customizations/deduplication/implementing-deduplication.mdx index 7d5e2fa96..c718ba43b 100644 --- a/v2/thirdpartypasswordless/common-customizations/deduplication/implementing-deduplication.mdx +++ b/v2/thirdpartypasswordless/common-customizations/deduplication/implementing-deduplication.mdx @@ -205,7 +205,7 @@ func main() { resp, err := originalSignInUpPOST(provider, input, tenantId, options, userContext) - if err.Error() == "Cannot sign up as email already exists" { + if err != nil && err.Error() == "Cannot sign up as email already exists" { // this error was thrown from our function override above. // so we send a useful message to the user return tpmodels.SignInUpPOSTResponse{