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

Api #17

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open

Api #17

wants to merge 38 commits into from

Conversation

eprothro
Copy link
Contributor

@eprothro eprothro commented Jun 5, 2014

No description provided.

layout false
respond_to :json

rescue_from Exception, with: :internal_error
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pierce-h is there a reason to rescue Exception instead of StandardError here?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, that should be standard error. I'll admit when it comes to catching errors and exceptions I am not 100% confident in my implementation. I have a rough idea of how I think it all should work.

include ApiHelpers

describe "API::V1" do
before(:each) { host! "api.#{host}" }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

teach me what host! is?

@eprothro
Copy link
Contributor Author

eprothro commented Jun 5, 2014

thoughts:

  1. centralizing expected status for action types
  2. likewise centralizing logic therof
  3. root resource node expectations?
  4. non-rescourceful non-critical error scenarios?

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

Successfully merging this pull request may close these issues.

2 participants