v1.16.8
This commit is contained in:
@@ -210,7 +210,7 @@ func (ldc *LegacyDecortClient) getToken(ctx context.Context) error {
|
||||
}
|
||||
|
||||
if resp.StatusCode != 200 {
|
||||
return fmt.Errorf("cannot get token: %s", tokenBytes)
|
||||
return newHTTPError("cannot get token", resp.StatusCode, tokenBytes)
|
||||
}
|
||||
|
||||
// save token in config
|
||||
@@ -291,8 +291,7 @@ func (ldc *LegacyDecortClient) do(req *http.Request, ctype string) ([]byte, erro
|
||||
}
|
||||
|
||||
// handle errors with status code other than 200
|
||||
err = fmt.Errorf("%s", respBytes)
|
||||
return nil, fmt.Errorf("could not execute request: %w", err)
|
||||
return nil, newHTTPError("could not execute request", resp.StatusCode, respBytes)
|
||||
}
|
||||
|
||||
func trimLegacyConfig(cfg *config.LegacyConfig) config.LegacyConfig {
|
||||
|
||||
Reference in New Issue
Block a user