Finalize inbox artifacts and error protocol
This commit is contained in:
@@ -45,6 +45,9 @@ func newWaitReplyCmd(root *rootOptions) *cobra.Command {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !result.Woke {
|
||||
return protocol.NoMatchingWork("no matching reply before timeout")
|
||||
}
|
||||
|
||||
data := map[string]any{
|
||||
"woke": result.Woke,
|
||||
@@ -63,10 +66,6 @@ func newWaitReplyCmd(root *rootOptions) *cobra.Command {
|
||||
if root.json {
|
||||
return protocol.WriteJSON(cmd.OutOrStdout(), resp)
|
||||
}
|
||||
if !result.Woke {
|
||||
_, err = fmt.Fprintln(cmd.OutOrStdout(), "wait-reply timed out")
|
||||
return err
|
||||
}
|
||||
|
||||
_, err = fmt.Fprintf(cmd.OutOrStdout(), "reply received on thread %s at event %d\n", result.Message.ThreadID, result.NextEventID)
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user