parse-community / parse-community/parse-server
Parse Server should return consistent error messages
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 21.4k
- Forks
- 4.8k
- Avg merge
- 7h 45m
- Merged PRs (30d)
- 11
Description
New Issue Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
- I can reproduce the issue with the latest version of Parse Server.
Issue Description
The Parse Server should return consistent error messages. However, it is returning a message field when an internal error occurs, see:
However, if you look at the other returns in:
and
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read src/middlewares.js at the referenced lines 364, 368, and 375-378, comparing the internal-error response with the other error responses. Confirm that the internal-error response uses the expected error field and verify the resulting JSON response against the issue's expected outcome.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- express, javascript, node.js
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100