Paste the error. Get out of the loop.
Your AI has 'fixed' it four times and the error is still there. Paste it here: what it means in plain English, the real cause, and a prompt that makes your AI investigate before it changes anything.
- Supabase, Stripe, auth, CORS, deploy and build errors
- A loop-breaking prompt for anything else
- Runs in your browser
From the browser console, your host's logs, or your AI tool. Nothing is sent anywhere.
Why AI tools get stuck on errors
Asked to fix an error, an AI changes something that looks related and says "Fixed!". If the real cause is somewhere else (a missing setting in production, a database permission, an expired key), each attempt adds noise, and the code gets worse while the error stays.
The way out is to understand the error first: where it comes from, what it means, and the evidence for each possible cause. Then make one change.
How to break a fix loop
- Stop asking for fixes. Ask what the error means and where it comes from.
- Find the exact failing request or line, in the browser's Network tab or your host's logs.
- Check the boring causes first: environment variables, the database you are connected to, keys, and settings in production.
- Make one change at a time. If two attempts fail, undo them and rethink.
Errors explained so far
- permission denied for table
- new row violates row-level security policy for table
- Access to fetch has been blocked by CORS policy
- 504 Gateway Timeout: FUNCTION_INVOCATION_TIMEOUT
- Error 400: redirect_uri_mismatch
- JWT expired / Auth session missing
- email rate limit exceeded
- 429 You exceeded your current quota
- relation does not exist / Could not find the table in the schema cache
- No signatures found matching the expected signature for payload
- Invalid API Key provided
- supabaseUrl is required
- Body exceeded 1 MB limit / 413 Payload Too Large
- remaining connection slots are reserved / too many clients already
- Supabase project is paused
- Email link is invalid or has expired
- Confirmation email link goes to localhost:3000
- Hydration failed because the server rendered HTML didn't match the client
- duplicate key value violates unique constraint
- npm ERR! 404 Not Found / Module not found: Can't resolve
- Mixed Content: the page was loaded over HTTPS, but requested an insecure resource
- 404 Page not found when refreshing a page
- TypeError: Failed to fetch
- TypeError: Cannot read properties of undefined (reading 'map')
- Unexpected token '<', "<!DOCTYPE "... is not valid JSON
- Too many re-renders. React limits the number of renders to prevent an infinite loop
- Objects are not valid as a React child
- ReferenceError: window is not defined
- useState only works in a Client Component. Add the "use client" directive
- useSearchParams() should be wrapped in a suspense boundary
- ReferenceError: process is not defined
- ERR_TOO_MANY_REDIRECTS
- DNS_PROBE_FINISHED_NXDOMAIN
- npm ERR! ERESOLVE unable to resolve dependency tree
- P1001: Can't reach database server
- prepared statement "s0" already exists
- FATAL: Tenant or user not found
- Database error saving new user
- Invalid login credentials
- No such price / No such customer
- Error 403: access_denied. The app has not completed the Google verification process
- This model's maximum context length is exceeded (context_length_exceeded)
- 405 Method Not Allowed
- Invalid hook call. Hooks can only be called inside of the body of a function component
- 500 Internal Server Error
Questions
- Is my error sent anywhere?
- No. Matching happens in your browser. Remove keys or personal data from logs before pasting them anywhere, including into your AI tool.
- What if my error is not on the list?
- You get a prompt built around your error that makes your AI explain the cause, list the likely reasons with evidence, and change one thing at a time. New errors are added to the list regularly.
- Why does the prompt tell the AI not to change code?
- Because fixing before understanding is how loops start. Reading the explanation first lets you judge whether the AI's diagnosis makes sense, and the fix that follows is usually small.