This is an automated email from the ASF dual-hosted git repository.

mdeuser pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/incubator-openwhisk-client-go.git


The following commit(s) were added to refs/heads/master by this push:
     new c7013c9  fixing logic on test for result success (#105)
c7013c9 is described below

commit c7013c9f456f35be34b3bf166535aaa03b834331
Author: tysonnorris <[email protected]>
AuthorDate: Wed Nov 21 06:57:52 2018 -0800

    fixing logic on test for result success (#105)
    
    * fixing logic on test for result success
    
    * fixing logic on test for result success
---
 whisk/client.go | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/whisk/client.go b/whisk/client.go
index a421a35..cbedf83 100644
--- a/whisk/client.go
+++ b/whisk/client.go
@@ -676,13 +676,10 @@ func IsResponseResultSuccess(data []byte) bool {
        errResp := new(WhiskErrorResponse)
        err := json.Unmarshal(data, &errResp)
 
-       if err != nil {
-               Debug(DbgWarn, "IsResponseResultSuccess: failed to parse 
response result: %v\n", err)
-               return false
-       }
-
        if errResp.Response != nil {
                return errResp.Response.Success
+       } else if err != nil { //failed to parse WhiskErrorResponse
+               Debug(DbgWarn, "IsResponseResultSuccess: failed to parse 
response result: %v\n", err)
        }
 
        return true

Reply via email to