You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 16, 2023. It is now read-only.
ErrVerifyingGCPAccessProof=errAPI.Code("gcp_verification_error").StatusError("could not verify GCP authorization", http.StatusInternalServerError)
14
+
ErrInvalidGCPAuthorizationCode=errAPI.Code("invalid_authorization_code").StatusError("authorization code was not accepted by GCP", http.StatusPreconditionFailed)
15
+
ErrGCPLinkPermissionDenied=errAPI.Code("gcp_permission_denied").StatusError("missing required projects.get permission to create link to GCP project", http.StatusPreconditionFailed)
"credential fingerprint must consist of 64 hexadecimal characters",
83
86
http.StatusBadRequest,
84
87
)
88
+
89
+
ErrInvalidGCPServiceAccountEmail=errAPI.Code("invalid_service_account_email").StatusError("not a valid GCP service account email", http.StatusBadRequest)
90
+
ErrNotUserManagerGCPServiceAccountEmail=errAPI.Code("require_user_managed_service_account").StatusError("provided GCP service account email is not for a user-manager service account", http.StatusBadRequest)
91
+
ErrInvalidGCPKMSResourceID=errAPI.Code("invalid_key_resource_id").StatusError("not a valid resource ID, expected: projects/PROJECT_ID/locations/LOCATION/keyRings/KEY_RING/cryptoKeys/KEY", http.StatusBadRequest)
Copy file name to clipboardExpand all lines: internals/api/server_errors.go
+22Lines changed: 22 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -84,6 +84,12 @@ var (
84
84
ErrNoAdminAccess=errHub.Code("no_admin_access").StatusError("Only accounts with Admin access can perform this action", http.StatusForbidden)
85
85
ErrMemberAlreadyExists=errHub.Code("member_already_exists").StatusError("The member already exists", http.StatusConflict)
86
86
87
+
// AWS IdP
88
+
ErrAWSRoleAlreadyTaken=errHub.Code("aws_role_taken").StatusError("a service account coupled to that IAM role already exists. Delete the existing service account or create a new one using a different IAM role.", http.StatusConflict)
89
+
90
+
// GCP IdP
91
+
ErrGCPServiceAccountAlreadyTaken=errHub.Code("gcp_service_account_taken").StatusError("a SecretHub service account coupled to that GCP Service Account email already exists. Delete the existing SecretHub service account or create a new one using a different GCP Service Account email.", http.StatusConflict)
92
+
87
93
// Account
88
94
ErrAccountNotFound=errHub.Code("account_not_found").StatusError("Account not found", http.StatusNotFound)
89
95
ErrUnknownSubjectType=errHub.Code("unknown_subject_type").Error("Unknown subject type") // no status error because it is an internal error
0 commit comments