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
[CLI-1828] Show detailed error when attempting to delete a cluster with active connectors (#1363)
* Added detailed error response to CatchKafkaNotFoundError even when the HTTP status code is 403. Also added new suggestion to check for active connectors.
* Modified corresponding golden files.
* Missed a line in one of the golden files in previous commit
* Modified the last suggestion to apply specifically to deletion
* Modified CatchKafkaNotFoundError to only suggest checking for active connectors in the case of a delete request
* Compact suggestion choosing
Co-authored-by: Brian Strauch <bstrauch@confluent.io>
* Cleaned up suggestion message
* Added back missing newline
* Updated resourceNotFoundErrMsg to say 'resource not found' instead of 'Forbidden'
* Updated more functions in catcher.go to also return v2 error detail in case of a 403 response, and added an integration test to test CatchServiceAccountNotFoundError
* Added integration test for deleting an environment that doesn't exist
* un-capitalize service account error
Co-authored-by: Brian Strauch <bstrauch@confluent.io>
* un-capitalize environment error
Co-authored-by: Brian Strauch <bstrauch@confluent.io>
* Removed redundant line and updated some golden files
* Error message code formatting
Co-authored-by: Brian Strauch <bstrauch@confluent.io>
* Update internal/pkg/errors/catcher.go
* fix integration tests
Co-authored-by: Brian Strauch <bstrauch@confluent.io>
returnNewWrapErrorWithSuggestions(err, "Service account not found or access forbidden", ServiceAccountNotFoundSuggestions)
275
+
returnNewWrapErrorWithSuggestions(CatchV2ErrorDetailWithResponse(err, r), "service account not found or access forbidden", ServiceAccountNotFoundSuggestions)
"Ensure the cluster is not associated with any active Connect clusters."
156
158
ChooseRightEnvironmentSuggestions="Ensure the cluster ID you entered is valid.\n"+
157
159
"Ensure the cluster you are specifying belongs to the currently selected environment with `confluent kafka cluster list`, `confluent environment list`, and `confluent environment use`."
Error: unable to set active API key: Forbidden: Unknown API key UNKNOWN
1
+
Error: unable to set active API key: resource not found: Unknown API key UNKNOWN
2
2
3
3
Suggestions:
4
4
If you did not create this API key with the CLI or created it on another computer, you must first store the API key and secret locally with `confluent api-key store UNKNOWN <secret>`.
Error: Kafka cluster not found or access forbidden: 403 Forbidden
1
+
Error: Kafka cluster not found or access forbidden: resource not found: 403 Forbidden
2
2
3
3
Suggestions:
4
4
Ensure the cluster ID you entered is valid.
5
5
Ensure the cluster you are specifying belongs to the currently selected environment with `confluent kafka cluster list`, `confluent environment list`, and `confluent environment use`.
6
+
Ensure the cluster is not associated with any active Connect clusters.
0 commit comments