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?
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.
Breaks at Database: Column missing; browser still says Saved
How it works
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
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
- Open the browser's and repeat the action to see the real request and status.
- Read the status: worked, 4xx the request was wrong, 5xx the server broke.
- After fetch, check response.ok before showing success.
- 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.