-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Open
Labels
type:featureNew feature or improvement of existing featureNew feature or improvement of existing feature
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:
parse-server/src/middlewares.js
Lines 375 to 378 in d8dc524
res.json({ | |
code: Parse.Error.INTERNAL_SERVER_ERROR, | |
message: 'Internal server error.', | |
}); |
However, if you look at the other returns in:
parse-server/src/middlewares.js
Line 364 in d8dc524
res.json({ code: err.code, error: err.message }); |
and
parse-server/src/middlewares.js
Line 368 in d8dc524
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
sadortun
Metadata
Metadata
Assignees
Labels
type:featureNew feature or improvement of existing featureNew feature or improvement of existing feature