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