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

Update I*,J*, K* handlers to use new send #701

Merged
merged 15 commits into from
Feb 28, 2024
Merged

Update I*,J*, K* handlers to use new send #701

merged 15 commits into from
Feb 28, 2024

Conversation

norkans7
Copy link
Contributor

No description provided.

Copy link

codecov bot commented Feb 21, 2024

Codecov Report

Attention: Patch coverage is 46.47887% with 38 lines in your changes are missing coverage. Please review.

Project coverage is 74.32%. Comparing base (eadf5a7) to head (08ce2dc).

Files Patch % Lines
handlers/infobip/handler.go 56.25% 4 Missing and 3 partials ⚠️
handlers/kaleyra/handler.go 30.00% 3 Missing and 4 partials ⚠️
handlers/jasmin/handler.go 33.33% 3 Missing and 3 partials ⚠️
handlers/kannel/handler.go 25.00% 3 Missing and 3 partials ⚠️
handlers/i2sms/handler.go 54.54% 3 Missing and 2 partials ⚠️
handlers/jiochat/handler.go 33.33% 2 Missing and 2 partials ⚠️
handlers/justcall/handler.go 72.72% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #701      +/-   ##
==========================================
+ Coverage   74.20%   74.32%   +0.12%     
==========================================
  Files          98       98              
  Lines       12922    12870      -52     
==========================================
- Hits         9589     9566      -23     
+ Misses       2632     2599      -33     
- Partials      701      705       +4     

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

@norkans7 norkans7 changed the title Ijk sends Update I*,J*, K* handlers to use new send Feb 21, 2024
}

groupID, err := jsonparser.GetInt(respBody, "messages", "[0]", "status", "groupId")
if err != nil || (groupID != 1 && groupID != 3) {
clog.Error(courier.ErrorResponseValueUnexpected("groupId", "1", "3"))
return status, nil
return courier.ErrFailedWithReason("", "unexpected groupId value")
Copy link
Member

Choose a reason for hiding this comment

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

should never have both a channel log and a terminal error

Copy link
Member

Choose a reason for hiding this comment

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

courier.ErrFailedWithReason is for passing back an external code that RP can link to a page with... this looks like it should ErrResponseUnexpected

}

groupID, err := jsonparser.GetInt(respBody, "messages", "[0]", "status", "groupId")
if err != nil || (groupID != 1 && groupID != 3) {
clog.Error(courier.ErrorResponseValueUnexpected("groupId", "1", "3"))
return status, nil
return courier.ErrFailedWithReason("", "unexpected groupId value")
Copy link
Member

Choose a reason for hiding this comment

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

courier.ErrFailedWithReason is for passing back an external code that RP can link to a page with... this looks like it should ErrResponseUnexpected

}
if respStatus != "success" {
return status, nil
return courier.ErrFailedWithReason("", "got non-success status")
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

@rowanseymour rowanseymour merged commit 7a79316 into main Feb 28, 2024
6 of 7 checks passed
@rowanseymour rowanseymour deleted the ijk-sends branch February 28, 2024 13:56
@github-actions github-actions bot locked and limited conversation to collaborators Feb 28, 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