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

'exists' returns an error #679

Closed
simoami opened this issue Oct 22, 2014 · 3 comments
Closed

'exists' returns an error #679

simoami opened this issue Oct 22, 2014 · 3 comments
Labels

Comments

@simoami
Copy link

simoami commented Oct 22, 2014

api/cards/{id}/exists

returns a 200 response if the element was found with:
{ "exists": true }

otherwise it returns a 404 error:

{
  "error": {
    "name": "Error",
    "status": 404,
    "message": "Unknown \"card\" id \"2\".",
    "statusCode": 404,
    "stack": "Error: Unknown \"card\" id \"2\".\n    at Function.setRemoting.rest.after ...."
  }
}

The proper behavior when the object is not found is to return a 200 response with:
{ "exists": false }

otherwise there is no point in reading the returned attribute.

@superkhau
Copy link
Contributor

reproducible, reporting as a bug

@superkhau
Copy link
Contributor

Fixed in #681

@simoami
Copy link
Author

simoami commented Dec 9, 2014

Thanks for the update!

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

No branches or pull requests

2 participants