Skip to content

Commit 707b041

Browse files
committed
fix
1 parent 051f0b2 commit 707b041

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

lib/ coingecko.actions.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,7 @@ export async function getCoinList(page: number = 1, perPage: number = 50) {
2222

2323
const res = await fetch(`${baseUrl}/coins/markets?${params}`, header);
2424

25-
if (!res.ok) {
26-
const errorText = await res.text();
27-
console.error('CoinGecko API Error:', res.status, errorText);
28-
throw new Error(
29-
`Failed to fetch CoinGecko API data: ${res.status} ${errorText}`
30-
);
31-
}
25+
if (!res.ok) throw new Error('Failed to fetch CoinGecko API data');
3226
return res.json();
3327
}
3428

0 commit comments

Comments
 (0)