apache / apache/openwhisk

Output dictionary with error field

Open
#2,699 3 comments 0 reactions 0 assignees View on GitHub
discussion programming model
Dominant language
Scala
Stars
6.8k
Forks
1.2k
Avg merge
2d 14h
Merged PRs (30d)
2

Description

When an action outputs a dictionary with an `error` field, the other fields are dropped from the output dictionary, for example:

```
$ wsk action invoke /whisk.system/utils/echo -br -p statusCode 404 -p error foo -p message bar
{
"error": "foo"
}
```

This is confusing and forces the action programmer to carefully wrap and unwrap things like error codes. I would prefer all the fields to be preserved.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the `wsk action invoke /whisk.system/utils/echo -br` example with `statusCode`, `error`, and `message` parameters, then trace where action results containing an `error` field are handled. Done means the output preserves `error` and the other fields, with a regression test covering this invocation.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.