@@ -122,25 +122,25 @@ func HandleHTTPRequest(message string, headers http.Header, data ConnectorMetada
122
122
}
123
123
124
124
if resp == nil {
125
- errResp .Response .ErrorString = fmt .Sprintf ("every function invocation retry failed; final retry gave empty response. http_endpoint: %v , source: %v " , data .HTTPEndpoint , data .SourceName )
125
+ errResp .Response .ErrorString = fmt .Sprintf ("every function invocation retry failed; final retry gave empty response. http_endpoint: %s , source: %s " , data .HTTPEndpoint , data .SourceName )
126
126
errorBytes , err := json .Marshal (errResp )
127
127
if err != nil {
128
- return nil , fmt .Errorf ("failed marshalling error response. http_endpoint: %v , source: %v " , data .HTTPEndpoint , data .SourceName )
128
+ return nil , fmt .Errorf ("failed marshalling error response. http_endpoint: %s , source: %s " , data .HTTPEndpoint , data .SourceName )
129
129
}
130
130
return nil , errors .New (string (errorBytes ))
131
131
}
132
132
133
133
if resp .StatusCode < 200 || resp .StatusCode > 300 {
134
134
body , err := io .ReadAll (resp .Body )
135
135
if err != nil {
136
- return nil , fmt .Errorf ("failed reading response body. http_endpoint: %v , source: %v " , data .HTTPEndpoint , data .SourceName )
136
+ return nil , fmt .Errorf ("failed reading response body. http_endpoint: %s , source: %s " , data .HTTPEndpoint , data .SourceName )
137
137
}
138
138
errResp .Response .ResponseBody = string (body )
139
139
errResp .Response .StatusCode = resp .StatusCode
140
- errResp .Response .ErrorString = fmt .Sprintf ("request returned failure: %v . http_endpoint: %v , source: %v " , resp .StatusCode , data .HTTPEndpoint , data .SourceName )
140
+ errResp .Response .ErrorString = fmt .Sprintf ("request returned failure: %d . http_endpoint: %s , source: %s " , resp .StatusCode , data .HTTPEndpoint , data .SourceName )
141
141
errorBytes , err := json .Marshal (errResp )
142
142
if err != nil {
143
- return nil , fmt .Errorf ("failed marshalling error response. http_endpoint: %v , source: %v " , data .HTTPEndpoint , data .SourceName )
143
+ return nil , fmt .Errorf ("failed marshalling error response. http_endpoint: %s , source: %s " , data .HTTPEndpoint , data .SourceName )
144
144
}
145
145
return nil , errors .New (string (errorBytes ))
146
146
}
0 commit comments