Skip to content

Commit

Permalink
refa: add trace logging for failed response verification
Browse files Browse the repository at this point in the history
  • Loading branch information
joshiste committed Dec 11, 2024
1 parent 7487ebd commit 74c0a0e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions exthttpcheck/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,9 @@ func requestWorker(executionRunData *ExecutionRunData, state *HTTPCheckState, ch
responseConstraintFulfilled := strings.Contains(bodyString, state.ResponsesContains)
metricMap["response_constraints_fulfilled"] = strconv.FormatBool(responseConstraintFulfilled)
responseBodyWasSuccessful = responseConstraintFulfilled
if !(responseConstraintFulfilled) {
log.Trace().Str("response_body", bodyString).Str("expected_string", state.ResponsesContains).Msg("response body does not contain expected string")
}
}
}
}
Expand Down

0 comments on commit 74c0a0e

Please sign in to comment.