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

Provide feedback when donation lambda fails. #33

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

adunkman
Copy link

I donated last week — the donation went through successfully, but the site hung showing "Processing…" and threw some errors to the console.

Looks like the root cause is that this lambda is crashing — I don’t see the code here, but I‘d be happy to take a look. The flow looks like this:

  • User fills out data in the form, and clicks Donate.
  • Stripe modal is presented to gather credit card info and process the payment.
  • Stripe modal closes, triggering a callback to the page.
  • The page sets the donate button text to "Processing…" and makes a request out to the above referenced lambda.
  • This request fails on CORS preflight because the response from this lambda doesn’t contain the appropriate CORS headers. (This appears to be because the lambda itself is crashing when handling the CORS preflight).
  • There is no error handler on the request, so the page stays in this state.

This PR implements a quick and dirty error handler for this post-donation request, and lets the user know that their donation was successful but they might not have had their special instructions saved. (Is this true? I don’t know what that lambda does).

Your donation was successful, but an error occurred when processing your special instructions. Send us a message at [email protected] if you have any special instructions for your donation.

Here’s what it looks like:

Screenshot of error message referenced above.


Additionally, I don’t have a copy of ruby which is functioning on my machine, so I added a Dockerfile and related docker-compose.yml, and documented it in the README.

@adunkman
Copy link
Author

Build errors appear to be because the pull request is from a fork; give me a shout if there’s more I should be doing to make this PR ready!

@danbjoseph
Copy link
Collaborator

with the switch to Open Collective for managing donations (see #44) i don't think this PR is needed anymore. apologies for no one reviewing this in a timely fashion. hopefully you'll still be interested in contributing to other issues in the future!

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

2 participants