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

Return more accurate response codes in API #48

Closed
3 tasks done
kahmali opened this issue May 2, 2015 · 1 comment
Closed
3 tasks done

Return more accurate response codes in API #48

kahmali opened this issue May 2, 2015 · 1 comment

Comments

@kahmali
Copy link
Owner

kahmali commented May 2, 2015

  • 201: Resource created (from collection POST endpoint)
  • 403: Role permission errors
  • 405: API method not found (but route exists)
    • According to RFC 2616: The response MUST include an Allow header containing a list of valid methods for the requested resource.
@kahmali kahmali added this to the v0.7.0 milestone May 2, 2015
@kahmali kahmali changed the title Return more accurate error response codes in API Return more accurate response codes in API May 2, 2015
kahmali added a commit that referenced this issue May 3, 2015
-Resolve task in Issue #48
  - 201 is the standard HTTP response code when a resource is created,
    which is done in a POST collection endpoint.
- Update README to include info about successful response codes (just a
  band-aid fix until the apiDoc is ready)
kahmali added a commit that referenced this issue May 3, 2015
- Resolve task in Issue #48
  - 403 is the standard response code for errors where the user is
    properly authenticated, but not allowed to access the requested
    resource
- Update README
kahmali added a commit that referenced this issue May 5, 2015
- Resolve task in Issue #48
  - Return a 405 error where applicable (the standard response when a
    request method is not allowed for a resource)
  - Return the mandatory (according to RFC 2616) 'Allow' response
    header with the full list of implemented methods for that route
  - Add and pass test for 405 error
  - Update tests that were expecting the standard Meteor static HTML
    response in this event to expect the 405 error instead
- Perform minor cosmetic code refactoring in Route
- Update change log to include all recently updated response codes
- Skip any README update for now, as the apiDoc will be coming very soon
@kahmali
Copy link
Owner Author

kahmali commented May 5, 2015

Resolved in a18603e. Pushed to 0.7.0.

@kahmali kahmali closed this as completed May 5, 2015
kahmali added a commit that referenced this issue Jun 21, 2015
-Resolve task in Issue #48
  - 201 is the standard HTTP response code when a resource is created,
    which is done in a POST collection endpoint.
- Update README to include info about successful response codes (just a
  band-aid fix until the apiDoc is ready)
kahmali added a commit that referenced this issue Jun 21, 2015
- Resolve task in Issue #48
  - 403 is the standard response code for errors where the user is
    properly authenticated, but not allowed to access the requested
    resource
- Update README
kahmali added a commit that referenced this issue Jun 21, 2015
- Resolve task in Issue #48
  - Return a 405 error where applicable (the standard response when a
    request method is not allowed for a resource)
  - Return the mandatory (according to RFC 2616) 'Allow' response
    header with the full list of implemented methods for that route
  - Add and pass test for 405 error
  - Update tests that were expecting the standard Meteor static HTML
    response in this event to expect the 405 error instead
- Perform minor cosmetic code refactoring in Route
- Update change log to include all recently updated response codes
- Skip any README update for now, as the apiDoc will be coming very soon
kahmali added a commit that referenced this issue Jul 2, 2015
-Resolve task in Issue #48
  - 201 is the standard HTTP response code when a resource is created,
    which is done in a POST collection endpoint.
- Update README to include info about successful response codes (just a
  band-aid fix until the apiDoc is ready)
kahmali added a commit that referenced this issue Jul 2, 2015
- Resolve task in Issue #48
  - 403 is the standard response code for errors where the user is
    properly authenticated, but not allowed to access the requested
    resource
- Update README
kahmali added a commit that referenced this issue Jul 2, 2015
- Resolve task in Issue #48
  - Return a 405 error where applicable (the standard response when a
    request method is not allowed for a resource)
  - Return the mandatory (according to RFC 2616) 'Allow' response
    header with the full list of implemented methods for that route
  - Add and pass test for 405 error
  - Update tests that were expecting the standard Meteor static HTML
    response in this event to expect the 405 error instead
- Perform minor cosmetic code refactoring in Route
- Update change log to include all recently updated response codes
- Skip any README update for now, as the apiDoc will be coming very soon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant