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

✨ » implement Error Section & handle errors better #3

Open
lucas-labs opened this issue Sep 24, 2024 · 0 comments
Open

✨ » implement Error Section & handle errors better #3

lucas-labs opened this issue Sep 24, 2024 · 0 comments
Labels
✨ enhacement enhacement proposal

Comments

@lucas-labs
Copy link
Owner

lucas-labs commented Sep 24, 2024

  • Error: A section that will be displayed when there's an irrecoverable error. Once this section is active, the app will show the error and wait for the user to quit the app. This is the only section that might never be active, but it's important to have it in the flow of the app, so that the app can handle errors gracefully.

Extracted from:

/// TODO: implement the Loading and Error components and logic:
/// There are three main children components:
/// - `Loading`: A component that will be displayed when the app is starting. This component
/// will be the first to be active and it will just show a loading message or spinner (or
/// nothing). It will be active until the git repo status is checked and the config files have
/// been read and loaded.
/// - `AppRouter`: The main section of the application, where we will be able to interact with
/// the app. This will route between the different main sections of the app and will shouw the
/// forms and info to be able to build our conventional commits.
/// - `Error`: A section that will be displayed when there's an irrecoverable error. Once
/// this section is active, the app will show the error and wait for the user to quit the app.
/// This is the only section that might never be active, but it's important to have it in the
/// flow of the app, so that the app can handle errors gracefully.

Extracted from #5

Display errors when they happen. Not only for committing but for all, including any possible panics that might occur.

Maybe using human-panic or some kind of custom hook to catch panics and display them to the user in our own way?

A way to make the program panic to see how bad it is right now, we can
set a bad config like:

askBody: x  # bad boolean value

Extracted from:

// TODO: handle errors better
// display errors when they happen. Not only for committing but for all, including
// any possible panics that might occur.
//
// Maybe using (human-panic)[https://ratatui.rs/recipes/apps/better-panic/] or
// some kind of custom hook to catch panics and display them to the user in
// our own way?

@lucas-labs lucas-labs added the ✨ enhacement enhacement proposal label Sep 24, 2024
@lucas-labs lucas-labs changed the title ✨ » implement the Loading and Error components and logic: ✨ » implement the Loading and Error components and logic Sep 26, 2024
@lucas-labs lucas-labs changed the title ✨ » implement the Loading and Error components and logic ✨ » implement Error components and logic Sep 26, 2024
@lucas-labs lucas-labs changed the title ✨ » implement Error components and logic ✨ » implement Error Section & handle errors better Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhacement enhacement proposal
Projects
None yet
Development

No branches or pull requests

1 participant