65 if (!blobResult.success) {
66 console.error(
67 `❌ Failed to fetch agent blob for ${pageId}:`,
68 blobResult.error,
69 );
72 pageId: pageId,
73 success: false,
74 error: "Failed to fetch agent blob",
75 details: blobResult.error,
76 });
356});
357
358export default app.fetch;
19 window.deferLoadingAlpine = function (start) { window._startAlpine = start; };
20 </script>
21 <!-- Offline-first vendor (populated by deno task vendor:fetch) -->
22 <script src="/frontend/vendor/dexie.min.js"></script>
23 <script type="module" src="frontend/init.js"></script>
86
87 private async getUserProfile(session: OAuthSession, agent: Agent): Promise<BlueskyUser> {
88 // Skip profile fetching for now, just use basic session info
89 return {
90 did: session.did,
50// });
51
52export default app.fetch;
53
15
16 useEffect(() => {
17 async function fetchWeather() {
18 const url = `https://api.open-meteo.com/v1/forecast?latitude=${city.lat}&longitude=${city.lon}¤t_weather=true`;
19 const res = await fetch(url);
20 const data = await res.json();
21 setWeather(data.current_weather);
22 }
23 fetchWeather();
24 }, [city]);
25
269
270 // Network-specific guidance
271 if (error.name === 'TypeError' && error.message.includes('fetch')) {
272 errorHtml += '<div class="error-details">';
273 errorHtml += '<strong>🌐 Network Error Troubleshooting:</strong>\\n';
406
407 try {
408 const response = await fetch('https://integrate.api.nvidia.com/v1/chat/completions', {
409 method: 'POST',
410 headers: requestHeaders,
442
443 // Re-throw with additional context if it's a network error
444 if (error.name === 'TypeError' && error.message.includes('fetch')) {
445 const networkError = new Error(\`Network Error: \${error.message}\`);
446 networkError.name = 'NetworkError';
36app.onError((err) => Promise.reject(err));
37
38// HTTP vals expect an exported "fetch handler"
39// This is how you "run the server" in Val Town with Hono
40export default app.fetch;
315 };
316 try {
317 const res = await fetch('/api/email',
318 {
319 method: 'POST',
419
420 try {
421 const response = await fetch(\`\${API_BASE_URL}/start\`, {
422 method: 'POST',
423 headers: { 'Content-Type': 'application/json' },
442 const pollJobStatus = async () => {
443 try {
444 const response = await fetch(\`\${API_BASE_URL}/status?jobId=\${jobId}\`);
445 if (!response.ok) throw new Error('Polling failed');
446