Skip to content

Commit

Permalink
Simplify permission error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
saaadAF committed Oct 31, 2024
1 parent f5da871 commit 222e78b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,9 @@ func main() {
err = kongCtx.Run(ctx, client)
if err != nil {
if k8serrors.IsForbidden(err) && !nctl.Verbose {
kongCtx.Fatalf("Permission denied: are you part of the organization?\nuse --verbose to see detailed error")
}else{
kongCtx.FatalIfErrorf(err)
err = errors.New("Permission denied: are you part of the organization?")

Check failure on line 163 in main.go

View workflow job for this annotation

GitHub Actions / lint

error strings should not be capitalized (ST1005)
}
kongCtx.FatalIfErrorf(err)
}

}
Expand Down

0 comments on commit 222e78b

Please sign in to comment.