Skip to content

Conversation

@masnnuller
Copy link
Contributor

In the following code, resp is overwritten by activation.response field when called d.Decode(&errorResponse). So resp.StatusCode is changed to activation's status code, not HTTP response status code. This causes parseApplicationError never calls when parsing action developer error activation.

https://github.com/apache/incubator-openwhisk-client-go/blob/4286a8212a74c40d8950ee76681a67e12c9bf1a0/whisk/client.go#L557-L569

This PR changes to ignore ErrorResponse.Response field on parsing.

  • I have signed a CLA

@rabbah rabbah requested a review from dubee April 17, 2019 16:56
@rabbah
Copy link
Member

rabbah commented Apr 17, 2019

Thanks @masnnuller for the explanation. Is there a test case we can add? I requested a review for @dubee who understands this code better than me.

@rabbah rabbah merged commit b7123e8 into apache:master Jan 5, 2021
@masnnuller masnnuller deleted the ignore-response-field branch January 7, 2021 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants