run_not_found means the run id is well formed, but no run with that id exists in the organization of your credential. Read this page when a run you just created, or one you stored earlier, cannot be read back.
What happened
Routes and their messages:
Runs belong to one organization, and every lookup is limited to the organization of the credential. A run created with a key from another organization is reported as not found. OpenType does not say whether the run exists elsewhere.
Common causes:
- The key belongs to a different organization than the key that created the run.
- The id was mistyped or copied from somewhere else. A value that is not
run_plus a UUID is refused earlier, withinvalid_run_idon the runs routes andinvalid_parameteron the usage route. - The
POST /v1/runsthat should have created it was refused. A refused request returns an error, not arun_id, so no run exists.
How to fix
- Read the run with a key from the organization that created it.
- Use the
run_idexactly as the API returned it. Both spellings work:run_+ 32 hex from the runs API, andrun_+ a hyphenated UUID from the usage API. - If you lost the id, list recent runs with
GET /v1/runs. Rows come newest first and carryrun_id,kind,stateandinput_digest. - If a create call timed out and you never saw a
run_id, do not guess: send the samePOST /v1/runsagain with the sameIdempotency-Key. You get the stored run back instead of a second run:200once it has finished,202while it is stillpending.
Example
runs_read.
Related
- Polling - read a run back after a client timeout.
- Idempotency - recover a run you never saw by replaying its key.
- invalid_run_id - the id is not shaped like a run id.
- Problem codes - every code, its status, and whether a retry can help.