Skip to content

Commit

Permalink
Fix nil error in HandleErrors (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
notanthony authored Jan 4, 2024
1 parent 42d62d9 commit e737c87
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/client/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ func (e *HTTPError) Error() string {
}

func HandleErrors(ctx context.Context, v *viper.Viper, input error) error {
if v == nil {
return input
}
outputType := v.GetString("output")
if outputType != "json" && outputType != output.JSONPretty {
return input
Expand Down

0 comments on commit e737c87

Please sign in to comment.