Skip to content

Parse Server should return consistent error messages #7444

@danielsanfr

Description

@danielsanfr

New Issue Checklist

Issue Description

The Parse Server should return consistent error messages. However, it is returning a message field when an internal error occurs, see:

res.json({
code: Parse.Error.INTERNAL_SERVER_ERROR,
message: 'Internal server error.',
});

However, if you look at the other returns in:

res.json({ code: err.code, error: err.message });

and

res.json({ error: err.message });

Steps to reproduce

Sorry, but I don't know how to reproduce it consistently.

Actual Outcome

{ 
   "code": 1, 
   "message": "Internal server error." 
}

Expected Outcome

{ 
   "code": 1, 
   "error": "Internal server error."
}

Failing Test Case / Pull Request

  • 🤩 I submitted a PR with a fix and a test case.
  • 🧐 I submitted a PR with a failing test case.

Environment

Server

  • Parse Server version: 4.5.0
  • Operating system: Linux
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): Both

Database

  • System (MongoDB or Postgres): Both
  • Database version: Any
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): Both

Client

  • SDK (iOS, Android, JavaScript, PHP, Unity, etc): Anyone
  • SDK version: Anyone

Logs

Not applicable

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