mirror of
https://github.com/freedbygrace/DynamoDNS.git
synced 2026-08-13 03:26:54 +00:00
Improve error handling and add user tracking for webhooks
Replit-Commit-Author: Agent Replit-Commit-Session-Id: 9111ef36-26c8-4085-84ca-a35dc1fec1b5 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7083d608-d6d3-4a6a-9a27-6286c5109627/7f30ef0d-2f71-4e3c-8bcd-86b7fce895eb.jpg
This commit is contained in:
@@ -105,7 +105,14 @@ export class DatabaseStorage implements IStorage {
|
||||
}
|
||||
|
||||
async getAllDomains(): Promise<Domain[]> {
|
||||
return await db.select().from(domains);
|
||||
try {
|
||||
return await db.select().from(domains);
|
||||
} catch (error) {
|
||||
console.error("Error fetching domains:", error);
|
||||
// If there's an error with the database query,
|
||||
// return an empty array rather than throwing an exception
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
async createDomain(domain: InsertDomain): Promise<Domain> {
|
||||
|
||||
Reference in New Issue
Block a user