Lovable Troubleshooting

Common issues when building the hotel booking app in Lovable, and the exact instruction to paste back into Lovable's chat to fix each one.

Connection & Setup

ProblemTell Lovable
Nothing works — all API calls fail or Edge Functions return 404Connect Supabase, deploy all Edge Functions (locations-search, hotels-search, hotel-static-content, rooms-and-rates, bookings-price-check, bookings-create, bookings-get, bookings-saved, bookings-saved-one), and run the bookings migration SQL from the prompt.
Auth or hotel API fails with 401 / "Travclan auth failed"Set these in Lovable Cloud Secrets: TRAVCLAN_API_KEY, TRAVCLAN_USER_ID, TRAVCLAN_MERCHANT_ID, TRAVCLAN_AUTH_URL, TRAVCLAN_SEARCH_API_URL, TRAVCLAN_HOTEL_HELPER_HOST, TRAVCLAN_SOURCE=website. Redeploy Edge Functions after updating secrets.
APIs work in sandbox but fail after go-liveCredentials and URLs must match the same environment. Update all three URL secrets from sandbox to production (trav-auth, hotel-volt-api, hotel-api without -sandbox) and use production API keys. Redeploy Edge Functions.
My Bookings page is empty even after bookingEnsure the bookings table exists. bookings-create must always insert a row on every book attempt. Check the Supabase table directly.

Edge Functions & Errors

ProblemTell Lovable
CORS errors in browser console when calling Edge FunctionsAll Edge Functions must set CORS headers for the Lovable frontend origin on every response, including errors.

Quick Mega-Fix

If the build has drifted off-spec in several places at once, paste this single message into Lovable instead of fixing things one at a time:

Re-align with the full prompt: Supabase Edge Functions proxy all Travclan calls; secrets in Supabase not frontend; bookings table + RLS; parse results.data for hotels and results.options for rooms; parseEdgeFunctionError for rooms rates; UI Error Rules (no Travclan/Volt in UI); src/config/brand.ts for theming; header tabs Hotels/Flight/Packages (only Hotels clickable); sandbox URLs in secrets until production go-live.


Did this page help you?