File tree Expand file tree Collapse file tree 4 files changed +22
-3
lines changed Expand file tree Collapse file tree 4 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ Types of changes
17
17
## [ 1.18.1]
18
18
19
19
- ` Fixed ` local seed parameter should be consistent between different jsonpath
20
- - ` Fixed ` PIMO Play web assembly version handle panics and recover gracefully when panics occure
20
+ - ` Fixed ` PIMO Play handle panics and recover gracefully when panics occure
21
21
22
22
## [ 1.18.0]
23
23
Original file line number Diff line number Diff line change @@ -46,6 +46,15 @@ func Play(enableSecurity bool) *echo.Echo {
46
46
47
47
// play binds client interface data entry to be processed and returns the transformed json to client
48
48
func play (ctx echo.Context ) error {
49
+ // dont't panic
50
+ defer func () error {
51
+ if r := recover (); r != nil {
52
+ log .Error ().AnErr ("panic" , r .(error )).Msg ("Recovering from panic in play." )
53
+ return ctx .String (http .StatusInternalServerError , r .(error ).Error ())
54
+ }
55
+ return nil
56
+ }() //nolint:errcheck
57
+
49
58
config := Config {
50
59
EmptyInput : false ,
51
60
RepeatUntil : "" ,
@@ -110,6 +119,15 @@ func play(ctx echo.Context) error {
110
119
}
111
120
112
121
func flowchart (ctx echo.Context ) error {
122
+ // dont't panic
123
+ defer func () error {
124
+ if r := recover (); r != nil {
125
+ log .Error ().AnErr ("panic" , r .(error )).Msg ("Recovering from panic in flow." )
126
+ return ctx .String (http .StatusInternalServerError , r .(error ).Error ())
127
+ }
128
+ return nil
129
+ }() //nolint:errcheck
130
+
113
131
var dataInput map [string ]interface {}
114
132
115
133
err := ctx .Bind (& dataInput )
Original file line number Diff line number Diff line change 2
2
3
3
# dependencies
4
4
/node_modules
5
+ ! /node_modules /go.mod
5
6
/.pnp
6
7
.pnp.js
7
8
@@ -23,6 +24,6 @@ npm-debug.log*
23
24
yarn-debug.log *
24
25
yarn-error.log *
25
26
26
- # Elm
27
+ # Elm
27
28
elm-stuff /
28
- gen /
29
+ gen /
You can’t perform that action at this time.
0 commit comments