Skip to content

Mail parser crashes on invalid JSON message files #260

@tps-flint

Description

@tps-flint

When a mail message file (e.g. inbox/new/*.json) contains invalid JSON, the tps mail list and tps mail log commands crash with a JSON parse error, breaking the entire mailbox.

To Reproduce:

  1. Create a malformed JSON file in an agent's mail directory
  2. Run tps mail list or tps mail log for that agent

Expected Behavior:
TPS should catch the JSON parse error, log a warning or move the corrupted file to a dead-letter queue/error directory, and continue processing the valid messages in the mailbox. A single corrupted file should not take down the whole mailbox.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions