We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1843560 commit 38062dbCopy full SHA for 38062db
1 file changed
pkg/event/service.go
@@ -14,7 +14,7 @@ type Invocation struct {
14
Id string `json:"id"`
15
Body interface{} `json:"body"`
16
Timeout time.Time `json:"timeout"`
17
- Response *string `json:"response"`
+ Response interface{} `json:"response"`
18
Error *RuntimeError `json:"error"`
19
ErrorType *string `json:"errorType"`
20
}
@@ -89,7 +89,12 @@ func (s Service) SendResponse(id string, body []byte) error {
89
return errors.New("invocation timeout")
90
91
92
- b := string(body)
+ var b interface{}
93
+ err := json.Unmarshal([]byte(body), &b)
94
+ if err != nil {
95
+ return err
96
+ }
97
+
98
inv.Body = b
99
return nil
100
0 commit comments