added more logging
This commit is contained in:
@@ -19,7 +19,8 @@ try {
|
||||
error = 'Failed to fetch posts';
|
||||
}
|
||||
} catch (e) {
|
||||
error = `Could not connect to backend at ${API_URL}: ${e instanceof Error ? e.message : String(e)}`;
|
||||
const cause = (e as any)?.cause;
|
||||
error = `Could not connect to backend at ${API_URL}: ${e instanceof Error ? e.message : String(e)}${cause ? ' (Cause: ' + (cause.message || cause.code || JSON.stringify(cause)) + ')' : ''}`;
|
||||
console.error(error);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user