mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-04-20 23:36:29 -04:00
Update internal/maa/patch.go
Co-authored-by: Daniel Weiße <66256922+daniel-weisse@users.noreply.github.com>
This commit is contained in:
parent
887587ba62
commit
65f34103a7
@ -59,11 +59,8 @@ func (p AzurePolicyPatcher) Patch(ctx context.Context, attestationURL string) er
|
||||
defer resp.Body.Close()
|
||||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
body, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return fmt.Errorf("updating attestation policy: unexpected status code: %s\nread response body: %w", resp.Status, err)
|
||||
}
|
||||
return fmt.Errorf("updating attestation policy: unexpected status code: %s\nresponse body: %s", resp.Status, string(body))
|
||||
body, _ := io.ReadAll(resp.Body)
|
||||
return fmt.Errorf("updating attestation policy: unexpected status code: %s: %s", resp.Status, string(body))
|
||||
}
|
||||
|
||||
return nil
|
||||
|
Loading…
x
Reference in New Issue
Block a user