We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
anyhow::bail!()
1 parent f0f2c29 commit 8e5b486Copy full SHA for 8e5b486
src/workflow.rs
@@ -40,7 +40,16 @@ where
40
context,
41
serde_json::from_value(value).expect("must succeed"),
42
);
43
- async { Ok(serde_json::to_value(result.await?).expect("must succeed")) }.boxed_local()
+ async {
44
+ let json_value = serde_json::to_value(result.await?).expect("must succeed");
45
+ if !json_value.is_object() && !json_value.is_null() {
46
+ anyhow::bail!(
47
+ "the result of a step function must be `null` serializable to a JSON value of an object: {json_value:?}"
48
+ );
49
+ }
50
+ Ok(json_value)
51
52
+ .boxed_local()
53
})
54
}
55
0 commit comments