Ch. 23 · Behavioral & HR

Behavioral Interviews: Failure and Specific Learning

Answer 'tell me about a time you failed' with a real mistake, what you did to recover, and a change in your habits that someone could observe.

~6 min readbeginnerupdated Oct 12, 2026

“Tell me about a time you failed” makes a lot of candidates nervous, so they pick something harmless or something that wasn’t really their fault. Both choices waste the question. Interviewers ask it because everyone who has shipped software has broken something, and how you talk about that tells them a lot about how you’d behave on their team the next time it happens.

The word that matters in this article’s title is “specific.” Interviewers hear “I learned to communicate better” and “I learned the importance of testing” all day. Those endings describe a feeling. What they’re listening for is a change you could point to.

What a failure question is testing

There are three things an interviewer is listening for.

Ownership. Do you say “I” when describing what went wrong, or does the failure belong to “the process,” “QA” or “the other team”?

Recovery. What did you do once you knew? The first hour after a problem surfaces says more about you than the mistake itself.

Learning. What’s different now? Not what you believe, but what you do.

Google’s SRE book describes the blameless postmortem, a write-up that looks for the contributing causes of an incident without pointing at individuals, on the reasoning that people hide problems when they expect to be blamed. That idea is useful here with one adjustment: blameless doesn’t mean ownerless. You can describe the gaps in the system and still own the part that was yours.

Choosing the right failure

The best story has real consequences that were recoverable, and your own decision is part of the cause. Good candidates for a software engineer include a migration that locked a busy table, an estimate that was badly wrong, a feature built that nobody used, a release that went out without a rollback plan, or a missed edge case that reached users.

Avoid three kinds of story. A disguised success (“I failed to stop working at six”) is a dodge. A story where someone else made the mistake shows nothing about you. A catastrophe with no clear learning, or anything involving dishonesty, raises worries the rest of the interview can’t settle.

If you’re early in your career, a failure from an internship, a group project or a personal project is fine. The structure is the same.

Worked example: an export that dropped rows

Here’s an illustrative scenario. Use it to see the structure, then build yours from something that happened to you.

You changed how a CSV export endpoint fetched its data, switching to pages of 500 rows. When the total number of rows was an exact multiple of 500, the loop stopped one page early, so the export silently lost its last 500 rows. Your tests used 1,203 rows and 7 rows, and neither was an exact multiple. Code review didn’t catch it either. Two days after release, a customer reported that their export was shorter than the on-screen list.

Weak version (illustrative):

I once missed a bug that went to production. It was a stressful week, but we fixed it quickly. I learned that testing is really important, and now I always test my code thoroughly.

There’s no detail to evaluate, “we fixed it” hides what you did, and “test thoroughly” is the generic ending interviewers stop listening to.

Stronger version (illustrative; replace the details with your own):

I’d rewritten our CSV export to fetch rows in pages of 500. I missed a boundary case: when the total was an exact multiple of 500, my loop stopped one page early, so those exports were missing their last 500 rows. My tests used 1,203 rows and 7 rows, and the reviewer and I both missed it.

A support ticket came in two days after the release. I reproduced it within half an hour, rolled the change back, and then used the export job logs to find every export since the release whose row count was a multiple of 500. There were 41. I gave that list to the support lead so they could contact those customers, and I re-ran the exports once the fix was out.

The fix was one line. The change I made to how I work was bigger: any loop over pages now gets tests at zero rows, one row, exactly one page and one page plus one, and I added “list the boundary values you tested” to our pull request template, because two people had missed this and it shouldn’t depend on someone remembering.

The recovery has concrete steps (reproduce, roll back, measure the impact, help support), and the learning is something a colleague could watch you do.

What specific learning sounds like

A simple test: could someone watching your work see the change? Compare these pairs.

  • “I learned to test more” versus “I test every pagination loop at zero, one, exactly a page and a page plus one.”
  • “I learned to communicate better” versus “I post a note in the support channel before releasing any change to an export or report, so they know what to watch for.”
  • “I learned to be more careful” versus nothing, because carefulness isn’t something anyone can observe.

If your learning hasn’t been tested by a later incident yet, say what you verify instead. “The checklist item has been in the template for three months; I can’t claim it’s prevented anything yet, but every PR touching pagination now lists its boundary cases” is honest, and interviewers respect it more than an invented success.

Blame, ownership and the reviewer who missed it too

There’s often a true and tempting detail: the reviewer missed it, QA didn’t test it, the requirements were vague. Mentioning it in the wrong way sounds like deflection. “The reviewer should have caught it” puts the failure on someone else. “Two of us looked at it and neither thought about exact multiples, which is why I put the check in the template instead of relying on memory” names the same fact as a system gap and shows what you did about it.

That distinction is what the blameless idea looks like in an interview: you describe causes without assigning blame, including to yourself in a self-punishing way, and you still own the fix.

Follow-up questions to expect

  • “How did you find out?” Be honest if a customer found it before you did.
  • “What did you tell your manager?” They want to hear that you told them early and plainly.
  • “Has anything like it happened since?” Answer truthfully, and if it has, say what the habit caught or missed.
  • “Tell me about a bigger failure.” Keep a second story ready, ideally about a judgment call rather than a bug, such as a wrong estimate or a feature nobody used.

Interview practice: rate three endings

A candidate tells the export story above and ends it in one of three ways. Which ending is strongest, and how would you fix the other two?

  • Ending A: “I learned a lot about the importance of testing edge cases.”
  • Ending B: “Every pagination change I write now has tests at zero, one, one full page and one page plus one, and I added that check to our PR template.”
  • Ending C: “I learned QA needs to be more thorough, so I asked them to add more test cases.”

Answer and reasoning

Ending B is strongest. It names a habit, it’s specific to the cause of the failure, and the PR template shows the candidate fixed the system rather than just promising to be more careful.

Ending A isn’t wrong, just empty. To fix it, ask “what do I do differently on Monday morning?” and say that instead. The answer is usually the specific test cases.

Ending C is the weakest, because the story was about the candidate’s own code and the ending hands the lesson to someone else. It might be reasonable to suggest QA add cases, but as the main learning it reads as deflection. A fixed version keeps the candidate’s own change at the center (“I added the boundary tests and the template item”) and mentions the QA suggestion, if at all, as a secondary step.

Keep practicing

More in Behavioral & HR

esc