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 {
|
||||
const response = await fetch(new URL("/api/instances", Astro.url));
|
||||
instances = await response.json();
|
||||
} catch {
|
||||
console.error("Couln't fetch instances");
|
||||
} catch (error) {
|
||||
console.error("Couln't fetch instances:", error);
|
||||
instances = [];
|
||||
}
|
||||
---
|
||||
|
|
Reference in a new issue