parse-community / parse-community/parse-server
`Hint` with invalid index returns internal server error
Open
Nobody has claimed this yet.
type:bug
- 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
When using hint, if an index that does not exist is specified, Internal server error is thrown.
Steps to reproduce
new Parse.Query('Test').hint('a').find()
Actual Outcome
Throws internal server error
Expected Outcome
Should return invalid hint
Environment
Server
- Parse Server version:
5.3.0 - Operating system:
macos - Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
local
Database
- System (MongoDB or Postgres):
mongo - Database version:
5.0 - Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
atlas
Client
- SDK (iOS, Android, JavaScript, PHP, Unity, etc):
js - SDK version:
3.5.0
Logs
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
Start by reproducing the issue through Parse.Query('Test').hint('a').find() against MongoDB and trace how the invalid hint is handled. The change is complete when a nonexistent index produces an invalid-hint error instead of an internal server error, while valid hints continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, mongodb, node.js
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100