> ## Documentation Index
> Fetch the complete documentation index at: https://docs.machinefi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Debugging Playbook

> Systematic triage for stream, condition, and job failures

## Goal

Find root causes quickly with a repeatable API-first debugging sequence.

## Fast Triage Loop

1. Re-run [Validate Stream](/api-reference/streams-validate).
2. Re-test condition with [Check Once](/api-reference/check-once).
3. Inspect [Get Job Details](/api-reference/jobs-get).
4. Map error code in the response payload.

## Failure Patterns and Fixes

### Stream validation fails

Symptoms:

* `NOT_LIVESTREAM`
* `STREAM_FETCH_FAILED`
* `STREAM_OFFLINE`

Actions:

* verify stream is currently live
* replace invalid/unreachable URLs
* retry after transient stream/network issues

### Condition never triggers

Symptoms:

* long-running jobs with no match

Actions:

* rewrite condition with explicit visual criteria
* validate with `check-once` before restarting monitor jobs

Reference: [Writing Reliable Conditions](/guides/writing-conditions)

### Job creation rejected

Symptoms:

* `MAX_JOBS_REACHED`

Actions:

* list jobs: [List Jobs](/api-reference/jobs-list)
* cancel stale jobs: [Cancel Job](/api-reference/jobs-delete)

### Delivery mismatch

Symptoms:

* expected SSE but got JSON
* expected webhook callbacks but none received

Actions:

* ensure `Accept: text/event-stream` for SSE
* ensure `webhook_url` is valid HTTPS and publicly reachable
* confirm your handler returns `2xx` promptly

## Decision Checklist During Incidents

* Is the stream still live?
* Does `check-once` confirm condition wording?
* Is job status progressing?
* Is delivery mode configured as intended?

## Next Steps

* Polling reliability patterns: [Use Polling](/guides/poll-jobs)
* Webhook reliability patterns: [Use Webhooks](/guides/webhooks)
* SSE client handling patterns: [Use SSE Streaming](/guides/sse-streaming)
