-
Notifications
You must be signed in to change notification settings - Fork 433
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
Alter log level for disabled services #1478
Conversation
Signed-off-by: Azanul <[email protected]>
Signed-off-by: Azanul <[email protected]>
Signed-off-by: Azanul <[email protected]>
@@ -34,12 +35,12 @@ RegionsLoop: | |||
"projects/" + client.GCPClient.Credentials.ProjectID + "/locations/" + regionName, | |||
).Do() | |||
if err != nil { | |||
if err.Error() == "googleapi: Error 403: Location "+regionName+" is not found or access is unauthorized., forbidden" { | |||
if err.Error() == "googleapi: Error 403: Location "+regionName+" is not found or access is unauthorized., forbidden" || strings.Contains(err.Error(), "SERVICE_DISABLED") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this resource specific or general 403 for all the services
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure, it was there already so I didn't change it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer a generic error handler that checks if the error with provider exist in our list and ignore it(this could stay in provider util- a provider specific handler)
Good suggestion! I thought so too but currently we have only one such error. Will implement it once we have more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should create an issue for similar cases for different provider
This service disabled errors are not actual errors was pointed out by a user. If you have knowledge of such cases for any providers please feel free to create respective issues |
Problem
Issue #1418
Solution
Fixes #1418
Changes Made
Checklist