Skip to content

Commit ebb27dd

Browse files
authored
[error] surface more fields in ContinueAsNew error (#1235)
What changed? To start a new workflow correctly, we actually need more fields: - serialized input - header info Potential risks low risk to add NEW receive methods on public struct
1 parent 342c383 commit ebb27dd

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

internal/error.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,16 @@ func (e *ContinueAsNewError) Args() []interface{} {
365365
return e.args
366366
}
367367

368+
// Input return serialized workflow argument
369+
func (e *ContinueAsNewError) Input() []byte {
370+
return e.params.input
371+
}
372+
373+
// Header return the header to start a workflow
374+
func (e *ContinueAsNewError) Header() *shared.Header {
375+
return e.params.header
376+
}
377+
368378
// newTerminatedError creates NewTerminatedError instance
369379
func newTerminatedError() *TerminatedError {
370380
return &TerminatedError{}

0 commit comments

Comments
 (0)