LogicTrail
  • Trails
  • Check my app
  • Pricing
  • Sign in
  1. Trails
  2. /
  3. The life of a click
  4. · 4 minutes · Free

The save that saved nothing

A user clicks Save on their profile. A green 'Saved!' appears. When they reload, their changes are gone.

This answers: Why does my app say saved when the save failed? No coding needed. 3 quick decisions.

  • How a request travels
  • Debugging without panic

Step 1 of 3

Where do you look first?

Choose an answer

Pick one. You will see what really happens, and why.

Why does my app say saved when the save failed?

fetch only throws on network failures, not on HTTP errors. A 500 response still resolves, so code that shows a success message right after await fetch() reports success even when the server failed. Check response.ok, and show the error when it is false.

Trail of the bug
  1. Browser
  2. Your server
  3. Database

Breaks at Database: Column missing; browser still says Saved

How it works

Reading a status code

2xx

It worked

200 OK · 201 Created · 204 No Content

4xx

The request was wrong or not allowed

400 Bad request · 401 Not signed in · 403 Not allowed · 404 Not found · 413 Too large · 429 Too many

5xx

The server broke

500 Server error · 504 Timed out

Every response carries one. The first digit tells you where to look: your request, or the server.

Why AI tools write this bug

AI-generated handlers often follow the happy path: call the , then show a toast. Error branches are skipped unless you ask for them.

How to fix it

  1. Open the browser's and repeat the action to see the real request and status.
  2. Read the status: worked, 4xx the request was wrong, 5xx the server broke.
  3. After fetch, check response.ok before showing success.
  4. Show the server's error to the user instead of a false success.

Check your own app

Paste this into Lovable, Cursor or Claude Code:

Find every place in the frontend that calls fetch, axios or a server action and then shows a success message. For each, tell me whether it checks the response status or catches errors before showing success. List the ones that do not.

Common questions

What is the difference between a 4xx and a 5xx error?
A 4xx means the request was wrong, for example bad input or not signed in. A 5xx means the server itself failed while handling a valid request.

Related scenarios

  • Works on my machinePro · 4 min
  • Blocked by CORSPro · 4 min
  • The reminder that never camePro · 4 min

More on this trail

The life of a click: Follow one button press from the browser to the database and back.

Want someone to look?

We check AI-built apps for this and three other common leaks, in plain English.

Check my app
Sign in