-
Notifications
You must be signed in to change notification settings - Fork 43
Parse an action's application error #133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
vendor/vendor.json
Outdated
| "revision": "d8f796af33cc11cb798c1aaeb27a4ebc5099927d", | ||
| "revisionTime": "2018-08-30T19:11:22Z" | ||
| }, | ||
| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did we bring on all these libs? lots of ones related to color console output? We should not be using these in the go-client (perhaps in the CLI). Did we accidentally pick up all dependencies used by the combined CLI (plugin) perhaps via govendor which does not discriminate actual libs. used by the code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prior to this PR (which does not seem to use any new external libs.) we only had vendor.json with these libs:
- github.com/davecgh/go-spew/spew
- github.com/pmezard/go-difflib/difflib
- github.com/stretchr/testify/assert
| return resp, whiskErr | ||
| } | ||
|
|
||
| func getApplicationErrorMessage(errResp interface{}) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what conditions caused a new format error to be generated? is there an example that can be cited that would be encountered (and added to the comment in code?). Would love to know where we have seen this error map format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mrutkows this fix is primarily for usage by the trigger create/delete code. this cli code invokes the action internally, and needs the error response details. without this pr, the error details are missing. here's the cli routine that invokes the client-go code. https://github.com/apache/openwhisk-cli/blob/368da5bf3d34b4a9b64204a0876618d79e014146/commands/trigger.go#L80
without this pr, you can see that the err returned from the Client.Triggers.Insert does not have the failure details when you create a trigger using your own "bad" feed action.
mrutkows
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed a commit to return vendor.json to original contents
|
@mrutkows - thanks! |
Currently, application errors are not parsed since the application error format is dynamic. This PR treats the application error as generic JSON, inspecting the "error" field for its data type and handling the type appropriately.
Also, vendor.json is updated to include several missing packages