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 Handling for API Calls in Frontend #86

Closed
OhmSpectator opened this issue Nov 26, 2023 · 4 comments · Fixed by #88
Closed

Implement Error Handling for API Calls in Frontend #86

OhmSpectator opened this issue Nov 26, 2023 · 4 comments · Fixed by #88
Assignees
Labels
enhancement New feature or request front Issues related to Web UI good first issue Good for newcomers

Comments

@OhmSpectator
Copy link
Owner

Description

Currently, our frontend components make several API calls without a consistent error handling strategy. This can lead to unhandled exceptions and a poor user experience when network requests fail or return unexpected results. We need to develop and implement a robust error handling mechanism across all components that interact with the API.

Scope

  • Review all existing API calls in the frontend codebase.
  • Design a standardized error handling approach that can be applied universally to all API interactions.
  • Ensure that the user is appropriately notified of any issues, and the application can gracefully handle API failures.

Acceptance Criteria

  • All API calls in the frontend are wrapped with try-catch blocks or use promise chaining with .catch() to handle errors.
  • Error handling includes logging for developers and user-friendly notifications where appropriate.
  • Components have fallback states or behaviors defined for when API calls fail.

Out of Scope

  • Backend error handling and logging.

Notes

  • Consider using a global error handling context or a higher-order component to manage repetitive error handling logic.
  • This issue does not require immediate resolution but should be addressed progressively to improve the stability and reliability of the application.
@OhmSpectator OhmSpectator added enhancement New feature or request good first issue Good for newcomers front Issues related to Web UI labels Nov 26, 2023
@OhmSpectator OhmSpectator changed the title Implement Comprehensive Error Handling for API Calls in Frontend Implement Error Handling for API Calls in Frontend Nov 26, 2023
@OhmSpectator
Copy link
Owner Author

Sometimes I return empty values ([], null), and sometimes I throw an error. I have to stick to one approach.

@pbelokon
Copy link
Contributor

@OhmSpectator I can give this a shot

@OhmSpectator
Copy link
Owner Author

@pbelokon sure!

@pbelokon
Copy link
Contributor

@pbelokon sure!

Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request front Issues related to Web UI good first issue Good for newcomers
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants