Skip to content

Commit

Permalink
Merge pull request #53 from nyaruka/ivr_log_body_fix
Browse files Browse the repository at this point in the history
Fix not logging bodies of incoming IVR requests
  • Loading branch information
rowanseymour authored Apr 3, 2023
2 parents 9186d95 + ba38a87 commit d10bf7e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions web/ivr/ivr.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ func newIVRHandler(handler ivrHandlerFn, logType models.ChannelLogType) web.Hand
return writeGenericErrorResponse(w, errors.Wrapf(err, "unable to get service for channel: %s", ch.UUID()))
}

// validate this request's signature
err = svc.ValidateRequestSignature(r)
recorder, err := httpx.NewRecorder(r, w, true)
if err != nil {
return svc.WriteErrorResponse(w, errors.Wrapf(err, "request failed signature validation"))
return svc.WriteErrorResponse(w, errors.Wrapf(err, "error reading request body"))
}

recorder, err := httpx.NewRecorder(r, w, true)
// validate this request's signature
err = svc.ValidateRequestSignature(r)
if err != nil {
return errors.Wrapf(err, "error reading request body")
return svc.WriteErrorResponse(w, errors.Wrapf(err, "request failed signature validation"))
}

clog := models.NewChannelLogForIncoming(logType, ch, recorder, svc.RedactValues(ch))
Expand Down

0 comments on commit d10bf7e

Please sign in to comment.