Skip to content

Commit

Permalink
Don't log succesful SMS sends twice (#490)
Browse files Browse the repository at this point in the history
and don't log success when there was an error
  • Loading branch information
David Robertson committed Feb 3, 2022
1 parent 029dbd0 commit ed72e38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
1 change: 1 addition & 0 deletions changelog.d/490.bugfix
@@ -0,0 +1 @@
Fix a bug introduced in Sydent 2.4.6 where errors communicating with openmarket would be logged as successes, and all successes would be logged twice.
9 changes: 1 addition & 8 deletions sydent/sms/openmarket.py
Expand Up @@ -151,6 +151,7 @@ async def sendTextSMS(
"Got response from sending SMS with malformed location header: %s",
value,
)
return
else:
ticket_id = parts[-1]

Expand All @@ -161,11 +162,3 @@ async def sendTextSMS(
request_id,
resp.code,
)

logger.info(
"Successfully sent SMS (ticket ID: %s, request ID %s), OpenMarket API"
" responded with code %d",
parts[-1],
request_id,
resp.code,
)

0 comments on commit ed72e38

Please sign in to comment.