We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 33a1ccb commit 9921430Copy full SHA for 9921430
main.ts
@@ -14,8 +14,16 @@ if (!serverSecret) {
14
15
defaultLogger.log(`Database Path Source: ${databasePath ? 'env' : 'default'}`);
16
17
-export const noteDatabase: NoteDatabase = await new NoteDatabase(databasePath).init();
+let noteDatabase: NoteDatabase;
18
19
+try {
20
+ noteDatabase = await new NoteDatabase(databasePath).init();
21
+} catch (error) {
22
+ defaultLogger.error('Failed to initialize NoteDatabase', error);
23
+ throw error;
24
+}
25
+
26
+export { noteDatabase };
27
// Configure rate limiter: 15 requests per minute, 5 min block duration
28
const rateLimiter = new ArcRateLimiter({
29
maxRequests: 15,
0 commit comments