top of page

Your Error Messages Are Controls

Writer: kate frese
kate frese
Nov 21
5 min read

Executive summary

Error handling is usually reviewed for crashes, not meaning. That misses the point, because the text a user sees when something fails decides what that user does next. A message that leaks internals helps an attacker and confuses everyone else. A message that says nothing useful pushes the user into a workaround, and the workaround usually corrupts the record. This post covers how error text fails, what a useful message contains, how existence checks leak, why silent success is worst, and a short standard to apply.

Two ways an error message fails

The first failure mode is saying too much. A stack trace, a database column name, a file path, a library version: each tells an outsider how the system is built. None of it helps the person holding the device.

The second is saying too little. "Something went wrong" is accurate and useless. It answers no question the user has, so they invent their own explanation and next step.

Both have the same root cause. The message described the system, not the situation. System detail belongs in the log, with a reference code tying the two together. The situation belongs on the screen.

The generic message trains a workaround

A user who gets "something went wrong" has three options: retry, abandon the task, or find another way. Retry is cheapest, so it happens first. If retry fails twice, the third option wins, and that is usually a spreadsheet, a phone call, or a note on paper.

That is the real cost. The product did not just fail to save a record. It taught the user that it cannot be trusted with this task, and the replacement lives outside every control you built. Nobody reviews a folder of spreadsheets for permission errors.

Worse, the retry is not harmless. If the save succeeded and only the response was lost, retrying creates a second record, and a vague message hides that entirely.

What a useful error contains

Every message needs four facts, each in a short sentence.

  • What happened, in plain language the user can repeat to a colleague.

  • What to do next, stated as an action.

  • A reference code short enough to read aloud to support.

  • Whether their data was saved, and if not, whether a draft survived.

The log holds the other half: timestamp, user, record, cause, and the same code. Support reads the code, finds the entry, and knows what the user saw. Without that link, the code is decoration.

Write for the tenth time a user has seen the error, not the first. Someone hitting it all shift does not need encouragement. They need to know if their work survived.

Deny by default, then hand them a door

Access control has one job: refuse when the answer is not clearly yes. The mistake is refusing without a route forward, because a wall with no door invites people to go around it.

A permission error should say what the user lacks and who can grant it. "You do not have permission to approve this inspection. Approvals are limited to the shift supervisor. Request access or send this for review." That enforces the control and gives a legal path, which reduces pressure to share a login.

The refusal must also arrive before the user spends effort. Blocking a submit after twenty minutes of entry produces anger, not compliance.

Errors that answer questions nobody asked

Some messages leak by confirming things. The classic is a reset screen that says "no account found for that address." It is friendly and it is a directory: submit addresses, learn who has an account.

The safe pattern is one message for all cases. "If an account exists for that address, a reset link is on its way." The same rule applies to records. "No inspection with that number" versus "that inspection belongs to another unit" tells an outsider the number is real and where it lives. One "not found or not available to you" closes both.

Log the distinction. Support needs to know which case occurred and the user does not. Be precise internally, vague externally, and let the reference code connect them.

Silent success is worse than a failure

A screen that accepts input, shows a spinner, and returns a blank form reports success. If nothing was saved, the user has no reason to check. They close the tab, the record is gone, and an auditor finds it three weeks later.

Make the state visible before and after the write. Disable the button while the request is in flight, so a double tap cannot send twice. Show the saved record with its identifier, not a toast that disappears. If the write went to a local queue, say so and keep the item visible until the server confirms.

Partial success is not success. A record saved without its attachments needs a report that names what is missing and a way to finish.

Worked example: four retries, four records

An inspector submits a completed safety round from a yard with weak signal. The save takes eight seconds, shows "Something went wrong," and clears the form. The inspector assumes nothing saved.

They fill it out again and get the same message. On the third attempt they photograph the screen as proof. On the fourth it works. Four submissions reached the server. The first three had saved, and only the response was lost.

The next morning the report shows four identical rounds for one location. A supervisor flags a data quality problem. A week goes to reconciling which of the four is real. All four are, and none is the record they wanted, because the numbers drifted as the inspector re-estimated each time.

Three changes would have prevented it. Return the record identifier in the response and show it on the success screen. Accept a client generated key with each submission, so a retry with the same key updates instead of duplicating. And replace the vague text with: "Your round was received but we could not confirm it. Reference R-4417. Check before resubmitting."

Put error text under review

Add one line to the release checklist. For every new failure path, write the message before the fix, then read it as the person at the point of work. Does it say what happened, what to do, and whether the data is safe? Does the code match a log entry? Would it tell a stranger whether an account exists?

That review is cheap and it catches the failures that cost the most. An error message is a control because it decides what a person does at the moment the system stops working. Write it deliberately and the workaround never starts.

Disclaimer

This article is for general informational purposes only and does not constitute legal, cybersecurity, workforce, or operational advice. BlueVioletApps LLC is an independent company and is not affiliated with, endorsed by, or sponsored by any federal agency, military branch, or government organization. Always validate requirements with qualified professionals and the responsible authorities for your environment.

Comments


with_padding (5).png

Blue Violet Security architectures are designed for NIST 800-53 alignment and CMMC 2.0 Level 2 readiness. Our commitment to secure, PII-safe environments is the foundation of every Fleet solution.

  • Instagram
  • Facebook
  • LinkedIn
  • BlueVioletApps, LLC

  • Status: (Verified SDVOSB) / Woman-Owned Small Business (Certification Pending)

  • SAM.gov UEI: L2YYBMHWGQC8

BlueVioletApps, LLC respects your privacy. We do not sell user data. All information collected via demo requests is used solely for professional outreach and is handled in accordance with our PII-safe architecture standards designed for NIST 800-53 alignment.

bottom of page