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

Adjust channel logs for Twilio #698

Merged
merged 4 commits into from
Feb 21, 2024
Merged

Adjust channel logs for Twilio #698

merged 4 commits into from
Feb 21, 2024

Conversation

norkans7
Copy link
Contributor

No description provided.

Copy link

codecov bot commented Feb 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f23d1ac) 73.93% compared to head (6b94511) 74.14%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #698      +/-   ##
==========================================
+ Coverage   73.93%   74.14%   +0.20%     
==========================================
  Files          98       98              
  Lines       13026    13052      +26     
==========================================
+ Hits         9631     9677      +46     
+ Misses       2704     2689      -15     
+ Partials      691      686       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

return courier.ErrResponseUnexpected
// https://developer.vonage.com/messaging/sms/guides/troubleshooting-sms
clog.Error(courier.ErrorExternal("send:"+nexmoStatus, sendErrorCodes[errCode]))
return courier.ErrFailedWithReason(fmt.Sprint(errCode), sendErrorCodes[errCode])
Copy link
Member

Choose a reason for hiding this comment

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

we don't want to these both because the error will be converted to a channel log error

Copy link
Member

Choose a reason for hiding this comment

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

ExpectedError: courier.ErrResponseUnexpected,

ExpectedError: courier.ErrFailedWithReason("10", "Too Many Existing Binds"),
ExpectedLogErrors: []*courier.ChannelError{courier.ErrorExternal("send:10", "Too Many Existing Binds")},
Copy link
Member

Choose a reason for hiding this comment

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

see above

@@ -291,7 +291,7 @@ func (h *handler) Send(ctx context.Context, msg courier.MsgOut, res *courier.Sen
if errorCode == errorStopped {
return courier.ErrContactStopped
}
return courier.ErrResponseUnexpected
clog.Error(twilioError(errorCode))
Copy link
Member

Choose a reason for hiding this comment

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

return courier.ErrWithReason(...)

return courier.ErrResponseUnexpected
// https://developer.vonage.com/messaging/sms/guides/troubleshooting-sms
clog.Error(courier.ErrorExternal("send:"+nexmoStatus, sendErrorCodes[errCode]))
return courier.ErrFailedWithReason(fmt.Sprint(errCode), sendErrorCodes[errCode])
Copy link
Member

Choose a reason for hiding this comment

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

@rowanseymour rowanseymour merged commit cb9e60a into main Feb 21, 2024
7 checks passed
@rowanseymour rowanseymour deleted the twilio-error branch February 21, 2024 22:31
@github-actions github-actions bot locked and limited conversation to collaborators Feb 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants