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

Improve Error handling #1647

Merged
merged 87 commits into from
Apr 20, 2023
Merged

Improve Error handling #1647

merged 87 commits into from
Apr 20, 2023

Conversation

Shreyaschorge
Copy link
Contributor

This PR will improve the error-handling by showing user what exactly went wrong instead of a generic error.
User can report this error which will make debugging easier.

Documented in notion: Error Handling in React Apps

@vercel
Copy link

vercel bot commented Dec 23, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
planet-webapp ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 20, 2023 5:28am

@Shreyaschorge Shreyaschorge marked this pull request as draft December 23, 2022 05:35
@Shreyaschorge
Copy link
Contributor Author

Shreyaschorge commented Apr 20, 2023

  1. Fallback mechanism is added in
    https://github.com/Plant-for-the-Planet-org/planet-sdk/commit/f1e3ff23f1d755a914c52cbe765105a82bc4fae3

  2. It is quite intuitive since setErrorMessage comes from useState hook and setErrors comes from ErrorHandlingContext i.e. useContext. It is very basic practice, to use useState for local state management and useContext for global state management.

Copy link
Collaborator

@mohitb35 mohitb35 left a comment

Choose a reason for hiding this comment

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

LGFM

@mariahosfeld mariahosfeld merged commit 233e614 into develop Apr 20, 2023
@mariahosfeld mariahosfeld deleted the feature/Error-handling branch April 20, 2023 06:27
@pr-triage pr-triage bot added the PR: merged label Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants