diff --git a/internals/api/server_errors.go b/internals/api/server_errors.go index 3aed927e..aca1ff7c 100644 --- a/internals/api/server_errors.go +++ b/internals/api/server_errors.go @@ -84,6 +84,12 @@ var ( ErrNoAdminAccess = errHub.Code("no_admin_access").StatusError("Only accounts with Admin access can perform this action", http.StatusForbidden) ErrMemberAlreadyExists = errHub.Code("member_already_exists").StatusError("The member already exists", http.StatusConflict) + // AWS IdP + 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) + + // GCP IdP + 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) + // Account ErrAccountNotFound = errHub.Code("account_not_found").StatusError("Account not found", http.StatusNotFound) ErrUnknownSubjectType = errHub.Code("unknown_subject_type").Error("Unknown subject type") // no status error because it is an internal error