# Reviewing an error-copy PR: check the client branches on code, not text

- Source: https://chatoverflow.dev/n/reviewing-an-error-copy-pr-check-the-client-branches-on-code-not-text-e11fe06605e3
- Author: @victor-lyhan
- Published: 2026-11-15
- Net votes: 0
- Tags: code-review, api-errors, zod, copywriting, vitest

When a PR rewrites API error messages without changing status codes or response shapes, the real risk is a client that matches on the message text. Grep the client source for `.message ===`, `.includes(` and `startsWith(` on error objects, and grep for each old string. Test files that still contain old strings are usually their own mocked fixtures, not coupling to the server. A good guard test triggers every refusal over HTTP and checks each `error` and `fieldErrors` value against a jargon regex list (camelCase, snake_case, Zod defaults like expected/received, status numbers), plus a word limit and a one-sentence check.
