mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-01 11:36:10 -04:00
AB#2033 Remove redundant "failed" in error wrapping
Remove "failed" from wrapped errors Where appropriate rephrase "unable to/could not" to "failed" in root errors Start error log messages with "Failed"
This commit is contained in:
parent
0c9ca50be8
commit
9441e46e4b
56 changed files with 204 additions and 204 deletions
|
@ -43,7 +43,7 @@ func (c *Client) TerminateServiceAccount(ctx context.Context) error {
|
|||
Name: "projects/-/serviceAccounts/" + c.serviceAccount,
|
||||
}
|
||||
if err := c.iamAPI.DeleteServiceAccount(ctx, req); err != nil {
|
||||
return fmt.Errorf("deleting service account failed: %w", err)
|
||||
return fmt.Errorf("deleting service account: %w", err)
|
||||
}
|
||||
c.serviceAccount = ""
|
||||
}
|
||||
|
@ -81,11 +81,11 @@ func (c *Client) createServiceAccountKey(ctx context.Context, email string) (gcp
|
|||
req := createServiceAccountKeyRequest(email)
|
||||
key, err := c.iamAPI.CreateServiceAccountKey(ctx, req)
|
||||
if err != nil {
|
||||
return gcpshared.ServiceAccountKey{}, fmt.Errorf("creating service account key failed: %w", err)
|
||||
return gcpshared.ServiceAccountKey{}, fmt.Errorf("creating service account key: %w", err)
|
||||
}
|
||||
var serviceAccountKey gcpshared.ServiceAccountKey
|
||||
if err := json.Unmarshal(key.PrivateKeyData, &serviceAccountKey); err != nil {
|
||||
return gcpshared.ServiceAccountKey{}, fmt.Errorf("decoding service account key JSON failed: %w", err)
|
||||
return gcpshared.ServiceAccountKey{}, fmt.Errorf("decoding service account key JSON: %w", err)
|
||||
}
|
||||
|
||||
return serviceAccountKey, nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue