Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Improve error message for missing store items #75

Merged
merged 1 commit into from
Nov 25, 2019

Conversation

davidme-stripe
Copy link
Contributor

Adding some additional logging to help diagnose #74.

@@ -341,11 +341,17 @@ def generate_payment_response(payment_intent)
"👚" => 2500,
}

def price_lookup(product)
price = EMOJI_STORE[product]
raise "Can't find price for %s (%s)" % [product, product.ord.to_s(16)] if price.nil?
Copy link
Contributor

Choose a reason for hiding this comment

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

should we have a default price for something instead of raising an exception?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I’d like to know why it’s happening instead of silently ignoring it: The Emoji store items should line up between the server and the client, so breakage could indicate a problem with Unicode parsing or something.

@davidme-stripe davidme-stripe merged commit cffb54a into master Nov 25, 2019
@mshafrir-stripe mshafrir-stripe deleted the davidme/better-emoji-error branch March 31, 2020 18:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants