fix: cloud or oss only error msg for parsable responses (#165)

* fix: cloud or oss only error msg for parsable responses

* fix: add code text to error message

* fix: keep the last part of the error msg

* chore: make the error code a little more succinct

* fix: corrected errors for non-server specific commands

* chore: sync openapi submodule with main
This commit is contained in:
William Baker
2021-06-30 12:37:31 -04:00
committed by GitHub
parent 69dedbcaa9
commit d7b2983dd4
20 changed files with 188 additions and 188 deletions

View File

@ -335,11 +335,11 @@ func (a *SetupApiService) PostSetupExecute(r ApiPostSetupRequest) (OnboardingRes
var v Error
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = _fmt.Sprintf("%s%v", errorPrefix, err.Error())
newErr.error = _fmt.Sprintf("%s: %s", newErr.Error(), err.Error())
return localVarReturnValue, newErr
}
v.SetMessage(_fmt.Sprintf("%s: %s", newErr.Error(), v.GetMessage()))
newErr.model = &v
newErr.error = _fmt.Sprintf("%s%v", errorPrefix, v.Error())
return localVarReturnValue, newErr
}