-
Notifications
You must be signed in to change notification settings - Fork 71
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
handlers/nexmo/handler.go
Outdated
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]) |
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.
we don't want to these both because the error will be converted to a channel log error
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.
the code here needs to be the way it was previously: "send:"+nexmoStatus to work with
handlers/nexmo/handler_test.go
Outdated
ExpectedError: courier.ErrResponseUnexpected, | ||
|
||
ExpectedError: courier.ErrFailedWithReason("10", "Too Many Existing Binds"), | ||
ExpectedLogErrors: []*courier.ChannelError{courier.ErrorExternal("send:10", "Too Many Existing Binds")}, |
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.
see above
handlers/twiml/handlers.go
Outdated
@@ -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)) |
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.
return courier.ErrWithReason(...)
f6440cb
to
093d89d
Compare
handlers/nexmo/handler.go
Outdated
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]) |
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.
the code here needs to be the way it was previously: "send:"+nexmoStatus to work with
No description provided.