Git Product home page Git Product logo

Comments (4)

bendrucker avatar bendrucker commented on June 8, 2024

handle the error if it can't

How? Swallowing errors (or printing to the console or any other option) is even worse for a lot of people.

Since this package is basically just boilerplate and a call to stripe-as-promised, I've generally said no to "advanced" features or anything else that serves a minority of users.

from angularjs-stripe.

PaddyMann avatar PaddyMann commented on June 8, 2024

By 'handle the error', I mean that it shouldn't kill the entire app, and could perhaps expose a 'errorLoadingStripe' variable similar.

To replicate what I'm talking about, take out the stripe.js <script> tag in one of your pages and see what happens. The same would happen if the Stripe site goes down.

Not too worried if you fix it as I've now handcranked, but thought I should raise the issue :)

from angularjs-stripe.

bendrucker avatar bendrucker commented on June 8, 2024

Yup, I totally know what you mean, but would prefer to stick to more aggressive behavior for now to keep things simple.

Check out the code—you can get the promisification bits from stripe-as-promised with almost no effort. You can go as deep as you want (lazy loading, error handling, etc.) while still retaining the same interface.

from angularjs-stripe.

PaddyMann avatar PaddyMann commented on June 8, 2024

In that case, you should really add a warning to the front page:

Warning: This component is not production ready. If you use this component and the Stripe JS file fails to load for any reason at all, your app will no longer work.

(though honestly, I think it's a huge bug to simply close in the name of the keeping things simple!)

from angularjs-stripe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.