Closed chiradeep closed 5 years ago
×
←→1 of 2 errors on the page
TypeError: Cannot read property 'map' of undefined
Statemachine.render
src/pages/Statemachine.js:133
130 | <TableCell>Stop Date</TableCell>
131 | </TableRow>
132 | </TableHead>
> 133 | <TableBody>
| ^ 134 | {items.map((item, key) => (
135 | <TableRow key={item.executionArn + key}>
136 | <TableCell component="th" scope="row">
View compiled
▶ 17 stack frames were collapsed.
(anonymous function)
src/pages/Statemachine.js:86
83 | }).then(res => res.json())
84 | .then(
85 | (result) => {
> 86 | this.setState({
| ^ 87 | isLoaded: true,
88 | items: result.executions,
89 | stateMachine: stateMachine
View compiled```
Unhandled Rejection (TypeError): Cannot read property 'map' of undefined
Statemachine.render
src/pages/Statemachine.js:133
130 | <TableCell>Stop Date</TableCell>
131 | </TableRow>
132 | </TableHead>
> 133 | <TableBody>
| ^ 134 | {items.map((item, key) => (
135 | <TableRow key={item.executionArn + key}>
136 | <TableCell component="th" scope="row">
View compiled
▶ 13 stack frames were collapsed.
(anonymous function)
src/pages/Statemachine.js:86
83 | }).then(res => res.json())
84 | .then(
85 | (result) => {
> 86 | this.setState({
| ^ 87 | isLoaded: true,
88 | items: result.executions,
89 | stateMachine: stateMachine```
If I execute both commands to create and execute a SM, I don't the the errors above. How exactly is it possible to reproduce them? You provide a wrong input and the statemachine fails on resolving the "payload" path but this situation is correctly displayed on the graph. If I provide the input sample from the code ({"step_name": "first_step","parent_step": "None","step_list": ["Start"],"payload": {}}) - everything works as well.
I've updated the repo to replace fatal errors listed above with a more user friendly output.
fixes to the http server fixed all issues