Skip to content

worker exits on malformed task_change payload instead of ignoring #130

@maxcountryman

Description

@maxcountryman

Summary

Malformed JSON payloads on task_change currently propagate an error and can terminate Worker::run_every.

Why this is a problem

The code logs that malformed payloads are being ignored, but returns the deserialization error with ?, which bubbles up and exits the worker loop.

Evidence

  • src/worker.rs:691 (serde_json::from_str(payload))
  • src/worker.rs:692 logs "Invalid task change payload; ignoring"
  • src/worker.rs:694 error is returned via ?

Expected behavior

Malformed notify payloads should be logged and ignored without stopping worker processing.

Proposed direction

  • On decode failure, return Ok(()) from handle_task_change after logging.
  • Optionally include a metric for malformed notifications.

Acceptance criteria

  • Injecting invalid task_change payload does not terminate worker loop.
  • Worker continues processing subsequent valid notifications and poll ticks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions