Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using Parse.Query #860

Closed
jiewmeng opened this issue Mar 6, 2016 · 2 comments
Closed

Error when using Parse.Query #860

jiewmeng opened this issue Mar 6, 2016 · 2 comments

Comments

@jiewmeng
Copy link

jiewmeng commented Mar 6, 2016

Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Server!

Environment Setup

  • Local Node and MongoDB
  • Tried both Node 4.2.2 and 5.7.0

Steps to reproduce

  • Clone parse server example
  • Add cloud function
Parse.Cloud.define('test', function(req, res) {
    var query = new Parse.Query(Parse.User);
    query.count()
        .then(count => res.success(count))
        .fail(err => res.error(err.message));
})
  • Call cloud function via POSTMAN
{
  "code": 141,
  "error": "Received an error with invalid JSON from Parse: Cannot POST /classes/_User\n"
}

Logs/Trace

@drew-gross
Copy link
Contributor

It looks like you forgot to include your parse mount point in URL when you initialized your SDK.

@jiewmeng
Copy link
Author

jiewmeng commented Mar 6, 2016

@drew-gross Ok fixed that. Maybe the example app should have it set. I was thinking the devs of parse server intended for the severURL to omit the parse mount point

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants