The app falls back to simulation data when the Zeus API calls fail. Common reasons:
- API Key not set - The default key
example123may not be valid - Network/CORS issues - Browser blocking the API calls
- API endpoint errors - Check browser console for specific error messages
-
Create
.env.localfile in the project root:cp .env.local.example .env.local
-
Edit
.env.localand replaceexample123with your actual API key:VITE_ZEUS_API_KEY=your_actual_api_key_here
-
Get your API key from the Zeus Subnet hackathon:
- Visit: https://www.zeussubnet.com/hackathon
- The documentation shows
example123as an example, but you need your actual hackathon API key - If you don't have one, contact the hackathon organizers
-
Restart the dev server after adding the key:
npm run dev
-
Verify the key is loaded: Check the browser console - you should see:
Zeus API Key Status: { keySet: true, keyPreview: "your...", keyLength: X }
The app now logs detailed error information to the browser console. To debug:
- Open browser DevTools (F12)
- Go to the Console tab
- Look for messages starting with:
- "Fetching from Zeus API:" - Shows what's being requested
- "Zeus API Error:" - Shows specific error details
- "Zeus API call failed" - Shows why it fell back to simulation
- Endpoint:
https://api.zeussubnet.com/forecast - Authentication: Bearer token in
Authorizationheader - Documentation: https://www.zeussubnet.com/hackathon
- API Key: Check
.env.localfile or use defaultexample123 - Timeout: 10 seconds per request
- Variables fetched: temperature, wind (u/v), precipitation, pressure, dewpoint