Commit c6b73d57 authored by Stefan Dähling's avatar Stefan Dähling
Browse files

fix error handling

parent 759c6fe9
Pipeline #434879 passed with stages
in 4 minutes and 18 seconds
......@@ -226,7 +226,11 @@ func (ams *AMS) updateAgentCustom(masID int, agentID int, custom string) (err er
var httpStatus int
httpStatus, err = ams.agencyClient.PutAgentCustom(agentAddress.Agency, agentID, custom)
if httpStatus != http.StatusOK || err != nil {
err = errors.New("error updating custom data " + err.Error())
if err != nil {
err = errors.New("error updating custom data " + err.Error())
} else {
err = errors.New("error updating custom data")
}
}
return
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment