LESSON 13 / 18·2 min readIntermediate

Errors, Timeouts, Retries, Cancellation, and Progress

Must knowConcept lesson
01 Understand02 Recall03 Prepare

Error taxonomy

  • Configuration: Missing environment variable, invalid command, or incompatible version.
  • Protocol: Malformed JSON-RPC or unsupported method.
  • Validation: Schema mismatch or invalid business value.
  • Authorization: Missing identity or permission denied.
  • Dependency: Database/API unavailable.
  • Timeout/cancellation: The operation deadline has been reached or the caller has stopped the operation.

Retry rules

  • Retry only transient failures.
  • Use exponential backoff with jitter.
  • Respect the overall deadline and server retry hints.
  • Do not automatically retry a non-idempotent write unless idempotency protection exists.

Progress and cancellation

A long-running operation can emit progress notifications when negotiated and requested. Cancellation is cooperative: propagate the abort signal to downstream fetch and database operations. Document and audit partial side effects after cancellation.

Useful error message

User-facing text should be safe and actionable: “Order service timed out; try again.” Internal logs can retain the correlation ID, operation, duration, and exception without exposing secrets.

PAUSE & RECALL

Can you explain it without the notes?

Errors, Timeouts, Retries, Cancellation, and Progress

Use your own words. Explain an example and one limitation before checking the explanation.

Check your explanation

Error taxonomy

CONNECT IT TO YOUR INTERVIEW

Turn this concept into a clear answer.

Practice this concept
YOUR NEXT STEP

Keep connecting the ideas.

Next lesson: Testing, Inspector, Logging, and Evaluation

Adapted from 20_MCP_SERVER.md · “13. Errors, Timeouts, Retries, Cancellation, and Progress”. Examples are study fragments; framework behavior can depend on your version.