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

Pass user-generated Stripe exceptions through #26

Merged
merged 1 commit into from
Dec 9, 2013

Conversation

adamonduty
Copy link
Contributor

This ensures that when StripeError is generated during the subscribed
block, the exception is passed through to layers past StripeEvent
rather than caught and returning a 401. Mostly useful during development
to let developers see their exceptions.

Re issue #23

This ensures that when StripeError is generated during the subscribed
block, the exception is passed through to layers past StripeEvent
rather than caught and returning a 401. Mostly useful during development
to let developers see their exceptions.

Re issue integrallis#23
@@ -19,6 +19,15 @@ def event_post(params)
expect(response.code).to eq '401'
end

it "ensures user-generated Stripe exceptions pass through" do
StripeEvent.setup do
Copy link
Contributor

Choose a reason for hiding this comment

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

You can use StripeEvent.subscribe('charge.succeeded') { |event| raise Stripe::StripeError } to be slightly more concise in tests.

@invisiblefunnel
Copy link
Contributor

Looks great. I'll figure out why the Rubinius tests are failing and fix it. Thank you!

invisiblefunnel added a commit that referenced this pull request Dec 9, 2013
Pass user-generated Stripe exceptions through
@invisiblefunnel invisiblefunnel merged commit 0d82ffe into integrallis:master Dec 9, 2013
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.

None yet

3 participants