Skip to content

Commit c371b88

Browse files
Keyfactorspbsoluble
authored andcommitted
fix(pam-types): types-list does not crash on nil httpResponse.
Signed-off-by: sbailey <1661003+spbsoluble@users.noreply.github.com>
1 parent 8042d64 commit c371b88

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
1+
12
# Keyfactor Command Utility (kfutil)
23

34
`kfutil` is a go-lang CLI wrapper for Keyfactor Command API. It also includes other utility/helper functions around automating common Keyfactor Command operations.
45

56
#### Integration status: Production - Ready for use in production environments.
67

8+
## About the Keyfactor API Client
79

10+
This API client allows for programmatic management of Keyfactor resources.
811

912
## Support for Keyfactor Command Utility (kfutil)
1013

1114
Keyfactor Command Utility (kfutil) is open source and supported on best effort level for this tool/library/client. This means customers can report Bugs, Feature Requests, Documentation amendment or questions as well as requests for customer information required for setup that needs Keyfactor access to obtain. Such requests do not follow normal SLA commitments for response or resolution. If you have a support issue, please open a support ticket via the Keyfactor Support Portal at https://support.keyfactor.com/
1215

1316
###### To report a problem or suggest a new feature, use the **[Issues](../../issues)** tab. If you want to contribute actual bug fixes or proposed enhancements, use the **[Pull requests](../../pulls)** tab.
1417

18+
---
19+
20+
21+
---
22+
1523

1624

1725
## Quickstart

cmd/pam.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,14 @@ var pamTypesListCmd = &cobra.Command{
6969
log.Trace().Interface("httpResponse", httpResponse).
7070
Msg("PAMProviderGetPamProviderTypes")
7171
if err != nil {
72+
var status string
73+
if httpResponse != nil {
74+
status = httpResponse.Status
75+
} else {
76+
status = "No HTTP response received from Keyfactor Command."
77+
}
7278
log.Error().Err(err).
73-
Str("httpResponseCode", httpResponse.Status).
79+
Str("httpResponseCode", status).
7480
Msg("error listing PAM provider types")
7581
return err
7682
}

0 commit comments

Comments
 (0)