Skip to content

Commit b887155

Browse files
tamilmani1989sharmasushant
authored andcommitted
Added log for 400 error
1 parent 712c5e7 commit b887155

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

telemetry/telemetry.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,12 @@ func (reportMgr *ReportManager) SendReport() error {
159159
}
160160

161161
if res.StatusCode != 200 {
162+
if res.StatusCode == 400 {
163+
return fmt.Errorf(`"[Azure CNI] HTTP Post returned statuscode %d.
164+
This error happens because telemetry service is not yet activated.
165+
The error can be ignored as it won't affect CNI functionality"`, res.StatusCode)
166+
}
167+
162168
return fmt.Errorf("[Azure CNI] HTTP Post returned statuscode %d", res.StatusCode)
163169
}
164170

@@ -206,7 +212,6 @@ func (report *Report) GetReportState() bool {
206212

207213
// This function creates a report with interface details(ip, mac, name, secondaryca count).
208214
func (report *Report) GetInterfaceDetails(queryUrl string) {
209-
210215
var (
211216
macAddress string
212217
secondaryCACount int

0 commit comments

Comments
 (0)