Skip to content

Commit

Permalink
Fixing lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sankur-codes committed Feb 9, 2024
1 parent 3b2c4a6 commit 8f90dfc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 4 additions & 1 deletion pkg/backend/openshiftcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,10 @@ func (ocb *openShiftClusterBackend) asyncOperationResultLog(log *logrus.Entry, i

err, ok := backendErr.(*api.CloudError)
if ok {
if int(err.StatusCode) < 500 {
if err.StatusCode < 300 && err.StatusCode >= 200 {
log.Info("long running operation succeeded")
return
} else if err.StatusCode < 500 {
log = log.WithField("resultType", utillog.UserErrorResultType)
} else {
log = log.WithField("resultType", utillog.ServerErrorResultType)
Expand Down
5 changes: 2 additions & 3 deletions pkg/frontend/frontend.go
Original file line number Diff line number Diff line change
Expand Up @@ -475,15 +475,14 @@ func frontendOperationResultLog(log *logrus.Entry, method string, err error) {

switch err := err.(type) {
case *api.CloudError:
if int(err.StatusCode) < 300 && int(err.StatusCode) >= 200 {
if err.StatusCode < 300 && err.StatusCode >= 200 {
log.Info("front end operation succeeded")
return
} else if int(err.StatusCode) < 500 {
} else if err.StatusCode < 500 {
log = log.WithField("resultType", utillog.UserErrorResultType)
} else {
log = log.WithField("resultType", utillog.ServerErrorResultType)
}
log = log.WithField("resultType", utillog.UserErrorResultType)
case statusCodeError:
if int(err) < 300 && int(err) >= 200 {
log.Info("front end operation succeeded")
Expand Down

0 comments on commit 8f90dfc

Please sign in to comment.