Skip to content

Parse.User.requestEmailVerification fails with code -1 when user is already verified #7740

Open

Description

@jonas-db

New Issue Checklist

Issue Description

A specific error code when the email verification fails when the user is already verified

Steps to reproduce

call Parse.User.requestEmailVerification when user is already verified

Actual Outcome

{"code":-1,"stack":"Error: Email anmphfnejxtxzkilwb@kvhrw.com is already verified"}

Expected Outcome

A better error code instead of -1
should have message instead of stackproperty?

Environment

Server

  • Parse Server version: "^5.0.0-beta.4",
  • Operating system: macos
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): local

Database

  • System (MongoDB or Postgres): MongoDB

Activity

  1. parse-github-assistant commented on Dec 13, 2021

    @parse-github-assistant

    Thanks for opening this issue!

    • 🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.
  2. pash2048 commented on Dec 22, 2021

    @pash2048
    Contributor

    Hi @mtrezza , May I work on this?

  3. mtrezza commented on Dec 22, 2021

    @mtrezza
    Member

    @pash2048 sure, please go ahead. I guess the first step would be to identify a better cloud code error number. I suggest you take a look at the Parse Error section in the contribution guide.

    I reclassified this as feature since it's a feature related improvement rather than a bug.

  4. added
    bounty:$10Bounty applies for fixing this issue (Parse Bounty Program)
    type:featureNew feature or improvement of existing feature
    and removed
    type:bugImpaired feature or lacking behavior that is likely assumed
    on Dec 22, 2021
  5. pash2048 commented on Dec 23, 2021

    @pash2048
    Contributor

    Dear @mtrezza , thanks for the opportunity. Very cool. Thumbs up!
    at the first, I need to send a pr to parse js SDK for a new Error code after merged change Parse JS SDK dependency in package.json of Parse Server and throw new Parse.Error with those error code in /src/Routes/UsersRouter.js.
    everything is alright?

  6. mtrezza commented on Dec 24, 2021

    @mtrezza
    Member

    Sounds good. For the Parse Server PR: changing the error code is a breaking change. We need to deprecate the old error code with a temporary server option to switch to the new error code. According to our deprecation policy, the new error code will be used by default in Parse Server 7 (2023).

  7. pash2048 commented on Dec 24, 2021

    @pash2048
    Contributor

    I did not figure out how I deprecate the old error code with a temporary server option to switch to the new error code. Can you please give me a hint?

  8. mtrezza commented on Dec 26, 2021

    @mtrezza
    Member

    Sure, please see the contribution guide for how to deprecate a feature and how to add a parse server option.

    For each of these there are existing usages in code where you can see how it's implemented.

  9. removed
    bounty:$10Bounty applies for fixing this issue (Parse Bounty Program)
    on Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:featureNew feature or improvement of existing feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions