Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve AMS error experience #1247

Merged
merged 4 commits into from
Oct 26, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/errors/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -770,8 +770,8 @@ func FailedClusterAuthorization(err error) *ServiceError {
reason := "failed to reserve quota"
// Visiting the OpenShift page in console registers the user and their organisation with OCM.
// See https://issues.redhat.com/browse/SDB-3194 for more context.
if svcErr.Is404() {
reason += " - visit https://console.redhat.com/openshift and try again"
if svcErr.Is404() || svcErr.IsForbidden() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I know visiting https://console.redhat.com/openshift does not help when AMS returns 403. So I'd split this off from the 404 case and maybe condense the error message a bit.

reason += " - visit https://console.redhat.com/openshift and try again. If that does not help and you are new customer of ACSCS, wait for 30 minutes and try again."
}
return NewWithCause(svcErr.Code, svcErr, reason)
}