mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 13:28:27 +00:00
requested changes
This commit is contained in:
@@ -52,4 +52,6 @@ jobs:
|
|||||||
CLI_TESTS_USER_PASSWORD: ${{ secrets.CLI_TESTS_USER_PASSWORD }}
|
CLI_TESTS_USER_PASSWORD: ${{ secrets.CLI_TESTS_USER_PASSWORD }}
|
||||||
# INFISICAL_VAULT_FILE_PASSPHRASE: ${{ secrets.CLI_TESTS_INFISICAL_VAULT_FILE_PASSPHRASE }}
|
# INFISICAL_VAULT_FILE_PASSPHRASE: ${{ secrets.CLI_TESTS_INFISICAL_VAULT_FILE_PASSPHRASE }}
|
||||||
|
|
||||||
run: go test -v -count=1 ./test
|
run: UPDATE_SNAPSHOTS=true go test -v -count=1 ./test
|
||||||
|
- name: Print updated files
|
||||||
|
run: cat ./test/.snapshots/test-TestUniversalAuth_SecretsGetWrongEnvironment
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ type APIError struct {
|
|||||||
|
|
||||||
func (e *APIError) Error() string {
|
func (e *APIError) Error() string {
|
||||||
msg := fmt.Sprintf(
|
msg := fmt.Sprintf(
|
||||||
"%s Unsuccessful response [%v %v] [status-code=%v] [reqId=%v]",
|
"%s Unsuccessful response [%v %v] [status-code=%v] [request-id=%v]",
|
||||||
e.Operation,
|
e.Operation,
|
||||||
e.Method,
|
e.Method,
|
||||||
e.URL,
|
e.URL,
|
||||||
@@ -56,6 +56,10 @@ func NewAPIErrorWithResponse(operation string, res *resty.Response, additionalCo
|
|||||||
errorMessage := util.TryParseErrorBody(res)
|
errorMessage := util.TryParseErrorBody(res)
|
||||||
reqId := util.TryExtractReqId(res)
|
reqId := util.TryExtractReqId(res)
|
||||||
|
|
||||||
|
if res == nil {
|
||||||
|
return NewGenericRequestError(operation, fmt.Errorf("response is nil"))
|
||||||
|
}
|
||||||
|
|
||||||
apiError := &APIError{
|
apiError := &APIError{
|
||||||
Operation: operation,
|
Operation: operation,
|
||||||
Method: res.Request.Method,
|
Method: res.Request.Method,
|
||||||
|
|||||||
Reference in New Issue
Block a user