-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Conversation
There was a problem hiding this 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
...es/messaging/message-import-manager/drivers/gmail/services/gmail-get-message-list.service.ts
Show resolved
Hide resolved
...es/messaging/message-import-manager/drivers/gmail/services/gmail-get-message-list.service.ts
Show resolved
Hide resolved
...erver/src/modules/messaging/message-import-manager/drivers/gmail/mocks/gaxios-error-mocks.ts
Outdated
Show resolved
Hide resolved
...erver/src/modules/messaging/message-import-manager/drivers/gmail/mocks/gaxios-error-mocks.ts
Show resolved
Hide resolved
...er/src/modules/messaging/message-import-manager/drivers/gmail/mocks/gmail-api-error-mocks.ts
Show resolved
Hide resolved
...ssaging/message-import-manager/drivers/gmail/utils/parse-gmail-messages-import-error.util.ts
Show resolved
Hide resolved
...messaging/message-import-manager/drivers/gmail/utils/parse-gmail-refresh-token-error.util.ts
Outdated
Show resolved
Hide resolved
...ssaging/message-import-manager/drivers/gmail/utils/parse-gmail-messages-import-error.util.ts
Show resolved
Hide resolved
...messaging/message-import-manager/drivers/gmail/utils/parse-gmail-refresh-token-error.util.ts
Outdated
Show resolved
Hide resolved
...messaging/message-import-manager/drivers/gmail/utils/parse-gmail-refresh-token-error.util.ts
Outdated
Show resolved
Hide resolved
...erver/src/modules/messaging/message-import-manager/drivers/gmail/mocks/gaxios-error-mocks.ts
Dismissed
Show dismissed
Hide dismissed
...erver/src/modules/messaging/message-import-manager/drivers/gmail/mocks/gaxios-error-mocks.ts
Dismissed
Show dismissed
Hide dismissed
...erver/src/modules/messaging/message-import-manager/drivers/gmail/mocks/gaxios-error-mocks.ts
Dismissed
Show dismissed
Hide dismissed
...erver/src/modules/messaging/message-import-manager/drivers/gmail/mocks/gaxios-error-mocks.ts
Dismissed
Show dismissed
Hide dismissed
...erver/src/modules/messaging/message-import-manager/drivers/gmail/mocks/gaxios-error-mocks.ts
Dismissed
Show dismissed
Hide dismissed
There was a problem hiding this 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
Closes #8733
GmailHandleErrorService