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

Add error handler when calling load('components') #33

Open
doubleppereira opened this issue Dec 28, 2020 · 1 comment
Open

Add error handler when calling load('components') #33

doubleppereira opened this issue Dec 28, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@doubleppereira
Copy link

doubleppereira commented Dec 28, 2020

Problem

Currently the react-wrapper doesn't allow to handle an error when calling load with an incorrect config.

If we do a init of a wrong config:

const chargebeeInstance = Chargebee.init({
  site: "site-name2", // wrong site
  domain: "https://mybilling.acme.com" // this is an optional parameter.
  publishableKey: "test__"
})

and we want to instantiate a CardComponent

The CardComponent will still be created even with a wrong configuration

Proposal

To allow the client to handle the error properly. Maybe having an onError handle event and a fallback component to render a custom error component in the render

@doubleppereira doubleppereira changed the title Add handling to error on Add handling on error when calling load('components') Dec 28, 2020
@doubleppereira doubleppereira changed the title Add handling on error when calling load('components') Add error handler when calling load('components') Dec 28, 2020
@cb-jose cb-jose added the enhancement New feature or request label Jan 25, 2021
@aseerkt
Copy link

aseerkt commented Jul 20, 2023

Hi @cb-jose Can I work on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants