A decentralized music tracking and discovery platform built on AT Protocol 🎵

Remove axios and log fetch errors

Remove axios from package.json and bun.lock. Simplify the OG API
fetch (remove custom headers) and log non-OK responses
(res.statusText and response body) before returning null.

+13 -20
+7 -10
apps/app-proxy/package.json
··· 1 1 { 2 2 "name": "@rocksky/app-proxy", 3 3 "version": "0.0.0", 4 + "devDependencies": { 5 + "@cloudflare/vitest-pool-workers": "^0.6.4", 6 + "@cloudflare/workers-types": "^4.20250129.0", 7 + "typescript": "^5.5.2", 8 + "vitest": "2.1.8", 9 + "wrangler": "^3.107.2" 10 + }, 4 11 "private": true, 5 12 "scripts": { 6 13 "deploy": "wrangler deploy", ··· 8 15 "start": "wrangler dev", 9 16 "test": "vitest", 10 17 "cf-typegen": "wrangler types" 11 - }, 12 - "devDependencies": { 13 - "@cloudflare/vitest-pool-workers": "^0.6.4", 14 - "@cloudflare/workers-types": "^4.20250129.0", 15 - "typescript": "^5.5.2", 16 - "vitest": "2.1.8", 17 - "wrangler": "^3.107.2" 18 - }, 19 - "dependencies": { 20 - "axios": "^1.8.4" 21 18 } 22 19 }
+6 -7
apps/app-proxy/src/html-rewriter.ts
··· 37 37 const api = new URL('https://api.rocksky.app/public/og'); 38 38 api.searchParams.set('path', url.pathname); 39 39 40 - const res = await fetch(api.toString(), { 41 - headers: { 42 - accept: 'application/json', 43 - 'accept-language': request.headers.get('accept-language') ?? 'en', 44 - }, 45 - }); 40 + const res = await fetch(api.toString()); 46 41 47 - if (!res.ok) return null; 42 + if (!res.ok) { 43 + console.log(res.statusText); 44 + console.log(await res.text()); 45 + return null; 46 + } 48 47 49 48 const og = (await res.json<OgData>()) as OgData; 50 49 og.url ??= url.toString();
-3
bun.lock
··· 90 90 "apps/app-proxy": { 91 91 "name": "@rocksky/app-proxy", 92 92 "version": "0.0.0", 93 - "dependencies": { 94 - "axios": "^1.8.4", 95 - }, 96 93 "devDependencies": { 97 94 "@cloudflare/vitest-pool-workers": "^0.6.4", 98 95 "@cloudflare/workers-types": "^4.20250129.0",