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

8733 refactor gmailhandleerrorservice #8901

Merged
merged 6 commits into from
Dec 5, 2024

Conversation

bosiraphael
Copy link
Contributor

Closes #8733

  • Refactor GmailHandleErrorService
  • Add tests and mocks for the errors

@bosiraphael bosiraphael linked an issue Dec 5, 2024 that may be closed by this pull request
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR refactors Gmail error handling by splitting generic error handling into specific, well-tested utilities for different error types in the messaging import system.

  • Added specialized error handlers in gmail-handle-error.service.ts for Gaxios, message list fetch, and message import errors
  • Created comprehensive mocks in /mocks/gaxios-error-mocks.ts and /mocks/gmail-api-error-mocks.ts for testing error scenarios
  • Added thorough test coverage in /__tests__/ directory for each error parsing utility
  • Modified error handling in Gmail services to use new specialized handlers instead of generic error handling
  • Added new error parsing utilities in /utils/ for different error types with specific exception mapping

14 file(s) reviewed, 26 comment(s)
Edit PR Review Bot Settings | Greptile

Copy link
Collaborator

@ijreilly ijreilly left a comment

Choose a reason for hiding this comment

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

works for me, dont have much context though

@bosiraphael bosiraphael merged commit de56c01 into main Dec 5, 2024
19 checks passed
@bosiraphael bosiraphael deleted the 8733-refactor-gmailhandleerrorservice branch December 5, 2024 16:58
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.

Refactor GmailHandleErrorService
2 participants