Add a bit better error handling
This commit is contained in:
parent
49a489d532
commit
f2ba7d5324
1 changed files with 2 additions and 2 deletions
|
@ -3,8 +3,8 @@ let instances;
|
||||||
try {
|
try {
|
||||||
const response = await fetch(new URL("/api/instances", Astro.url));
|
const response = await fetch(new URL("/api/instances", Astro.url));
|
||||||
instances = await response.json();
|
instances = await response.json();
|
||||||
} catch {
|
} catch (error) {
|
||||||
console.error("Couln't fetch instances");
|
console.error("Couln't fetch instances:", error);
|
||||||
instances = [];
|
instances = [];
|
||||||
}
|
}
|
||||||
---
|
---
|
||||||
|
|
Reference in a new issue