SEO + AEO on AutopilotFrom the team at Stackmatix
The Growth Library

Write Error Messages That Offer Recovery Without Disclosing Protected Facts

Design public error messages from supported recovery actions and disclosure limits, keeping sensitive diagnostics out of the reader-facing explanation.

A product error message should identify the supported problem and next action without revealing information the reader is not authorized to know. More detail is not always more helpful. A message can disclose private account existence, item ownership, or system internals while trying to sound precise.

Define what the application actually knows, what it may disclose, and which recovery route exists. Keep public wording separate from restricted diagnostics. Do not solve a security boundary by making every error an unexplained “Something went wrong,” or solve usability by publishing every internal reason.

The troubleshooting guide chooses safe probes across a diagnostic path. This method determines the immediate message and its permitted information before that wider investigation begins.

Scope security guidance to the relevant function

The OWASP Authentication Cheat Sheet recommends generic responses for authentication functions so differences do not reveal whether an account exists, is locked, or has incorrect credentials. It discusses discrepancy factors beyond the visible sentence.

That is specific authentication guidance, not a rule that every product validation error must be vague. A user who enters an invalid date may safely receive a precise formatting correction. Whether an object-level failure can reveal existence requires the actual application's security design and review.

The four examples below are original fictional message scenarios. They are not a security audit, a declaration of compliance, or claims about a real service's implemented protections. The content owner needs the responsible security and product owners to establish the actual disclosure contract.

Populate a four-context message record

Fictional public message and diagnostic boundary
ContextPermitted public evidenceComplete candidate messageRestricted evidence
Authentication failureAttempt did not establish access; no account-status disclosureWe could not sign you in. Check your details or use the supported account-recovery option.Actual credential/account condition through authorized diagnostics
Protected item link unavailableThis request cannot expose the underlying private conditionThis item is not available here. Check the link and your intended workspace, or use the support route.Existence,owner and permission details under access controls
Invalid date supplied in a public formEntered value does not satisfy declared formatEnter a date in YYYY-MM-DD format, for example 2026-11-19.No secret diagnostic needed for this format correction
Save response unavailableCompletion has not been confirmed to this interfaceWe could not confirm the save. Check the current record state through the supported view before submitting again.Correlated operation evidence for authorized support review

These messages assume the stated recovery actions exist in the fictional product. A real interface must verify them before promising a reset, support process, or state lookup. The protected-link wording intentionally does not confirm whether a private item exists.

Separate message precision from factual overreach

For the date case, the expected format and example are directly useful. They do not reveal another person's information. The product still needs its actual validation and internationalization requirements; this example does not require every product to use the same date format.

For authentication, “This email is not registered” can create a different disclosure from “Incorrect password for this account.” The OWASP source explains why the distinction matters. Copy changes must align with the full response behavior rather than hiding a difference only in one visible label.

For the save case, a lost response is not proof that nothing changed. The proposed wording preserves uncertainty and offers a supported inspection path. It does not define an asynchronous job protocol or authorize replaying uncertain writes. Avoid turning a convenient Retry label into an unsupported guarantee.

Write the recovery route from real capability

Every next action should be available to the person encountering the error. A support contact, recovery form, administrator request, or record-state view must be verified for the current product context. Do not invent an automatic recovery mechanism because it would make the message friendlier.

Keep the action concrete. Check the link, correct a field, return to a known workspace, or use an established recovery route are more informative than a generic reassurance. Where the next step depends on a role, explain that condition without disclosing private information.

The form behavior test checks whether validation and persistence match feedback. Use that evidence to avoid reporting success or definite failure before the relevant state has been established.

Keep diagnostic references safe and useful

An internal diagnostic can include a permitted correlation reference, product revision, action context, and error classification. Do not place access tokens, raw credentials, private payloads, or account inventories into the public message merely to make support easier.

If the product exposes a support reference, verify that it does not itself grant access or encode protected details. Explain how the reader can use it through the approved route. A reference number is useful only when the support process can connect it to authorized evidence.

The public content review does not need a copy of every restricted log. It needs enough approved information to verify that the proposed explanation and next action are accurate. Keep sensitive diagnostic evidence in its proper controlled system.

Test message families and alternatives

Use harmless synthetic states to compare related public responses. For authentication, review whether visible wording or other exposed behavior undermines the intended generic treatment with the responsible implementation owner. A writing review alone cannot certify timing or transport protections.

For ordinary validation, check that the person can identify the field and correct it without losing unrelated work under the actual workflow. Preserve specificity where it is appropriate; security should not become a generic excuse for unusable instructions.

Add negative copy fixtures. One says a private item belongs to a named person; another promises a successful save after an unavailable response. Both should fail this fictional disclosure-and-truthfulness record for different reasons. Record the reason, not only a universal bad-message score.

Release an owned error-copy decision

Save each error context, permitted facts, exact message, action, restricted diagnostic boundary, negative examples, and review owners. Recheck when account recovery, permissions, storage, validation, or support routes change. A previously accurate message can become wrong without a copy edit.

The verification worksheet separates security guidance, product evidence, and original wording. Have the appropriate reviewer inspect the actual final interface before claiming the message family behaves correctly.

Approve when the tested message tells the reader enough to take a supported next step while preserving protected facts and uncertainty. A good error explanation is neither a public log dump nor an empty apology; it is a truthful, bounded part of the product workflow.

Sources

Matt Pru

Co-founder and CEO of Stackmatix. Writing about growth, customer acquisition, and the decisions behind useful marketing. Connect on LinkedIn.

Developed with AI assistance under Matt's editorial direction. Our Editorial Approach