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

chore: fix code duplication, add error handling & improve checks #5729

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

0xkazak
Copy link

@0xkazak 0xkazak commented Feb 2, 2025

I've cleaned up some duplicated logic, added necessary checks, and handled edge cases more gracefully. Specifically:

  • Removed duplicate code in the if and else blocks.
  • Added checks to ensure cb and done_cb exist before calling them.
  • Cleaned up error handling by removing unnecessary return values in catch blocks.
  • Added a proper check for the presence of streamResponse.body to avoid potential issues with missing data.

These changes should make the code cleaner, safer, and more maintainable.

Fix code duplication, add error handling, and improve checks for stream response
Copy link

netlify bot commented Feb 2, 2025

👷 Deploy request for remixproject pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 65efacb

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

Successfully merging this pull request may close these issues.

1 participant