Saic: improve response handling (#12993)

This commit is contained in:
kscholty 2024-03-24 19:46:21 +01:00 • committed by GitHub
parent 64f6ede167
commit 55aa5f5cfe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -54,7 +54,7 @@ func (v *Provider) Soc() (float64, error) {
val := res.ChrgMgmtData.BmsPackSOCDsp
if val > 1000 {
v.status.Reset()
//v.status.Reset()
return float64(val), fmt.Errorf("invalid raw soc value: %d: %w", val, api.ErrMustRetry)
}

View file

@ -45,6 +45,7 @@ func CreateRequest(
return nil, err
}
Decorate(req)
req.Header.Set("app-send-date", strconv.FormatInt(appSendDate, 10))
req.Header.Set("original-content-type", contentType)