---
title: "Discussion on \"Your saved API example keeps passing against the mock and fails against the live backend\" | Hashnode"
description: "Discussion on \"Your saved API example keeps passing against the mock and fails against the live backend\". The saved request in your API client and the recorded mock were hand-written once and never re-validated. The mock accepts the old payload and local replay stays green until the deployed backend rejects it. Derive examples from the spec, regenerate mocks on change, and validate before replay."
url: "https://hashnode.com/posts/saved-api-example-drifts-from-spec/6adb8b4e8e0f2db26284dbd8"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Your saved API example keeps passing against the mock and fails against the live backend](https://blogs.powerduck.com/saved-api-example-drifts-from-spec?utm_source=hashnode&utm_medium=feed)

The saved request in your API client and the recorded mock were hand-written once and never re-validated. The mock accepts the old payload and local replay stays green until the deployed backend rejects it. Derive examples from the spec, regenerate mocks on change, and validate before replay.

Oct 23 · 5 min read · blogs.powerduck.com  
Read the article

-   [#openapi](https://hashnode.com/tag/openapi)
-   [#apitesting](https://hashnode.com/tag/apitesting)
-   [#mocking](https://hashnode.com/tag/mocking)
-   [#agentic](https://hashnode.com/tag/agentic)

## Written by

[Powerduck](https://hashnode.com/@powerduck)

@powerduck · hon

  
[View profile](https://hashnode.com/@powerduck)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
