Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions internal/commands/request/request_internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ func runInternalPingOneRequest(uri string) (err error) {
}

if res.StatusCode < 200 || res.StatusCode >= 300 {
// Note we don't os.Exit(1) here because pingcli has executed
// without issue, despite a failed response to the custom request
output.UserError("Failed Custom Request", fields)
} else {
output.Success("Custom request successful", fields)
Expand Down
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"fmt"
"os"
"runtime/debug"

"github.com/pingidentity/pingcli/cmd"
Expand Down Expand Up @@ -33,5 +34,6 @@ func main() {
err := rootCmd.Execute()
if err != nil {
output.UserError(fmt.Sprintf("Failed to execute pingcli: %v", err), nil)
os.Exit(1)
}
}