File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -374,8 +374,8 @@ class RailwayMCPServer {
374374 this . db . prepare ( 'DELETE FROM admin_sessions WHERE datetime(expires_at) <= datetime("now")' ) . run ( ) ;
375375 }
376376 }
377- } catch ( e ) {
378- console . warn ( 'Admin session cleanup failed:' , e ) ;
377+ } catch ( error ) {
378+ console . warn ( 'Admin session cleanup failed:' , error ) ;
379379 }
380380 } ;
381381 // initial cleanup and then interval
@@ -715,8 +715,7 @@ class RailwayMCPServer {
715715 ) ;
716716 }
717717
718- // Get database URL for this user's context
719- const databaseUrl = process . env . DATABASE_URL ;
718+ // Database URL is available via env for client configuration
720719 } else {
721720 // SQLite version
722721 const keyRow = this . db . prepare (
@@ -1041,7 +1040,9 @@ class RailwayMCPServer {
10411040 } else {
10421041 this . db . prepare ( 'DELETE FROM admin_sessions WHERE id = ?' ) . run ( oldJti ) ;
10431042 }
1044- } catch { }
1043+ } catch ( error ) {
1044+ console . warn ( 'Failed to delete session during refresh:' , error ) ;
1045+ }
10451046
10461047 const jti = Math . random ( ) . toString ( 36 ) . slice ( 2 ) + Math . random ( ) . toString ( 36 ) . slice ( 2 ) ;
10471048 const hours = parseInt ( process . env [ 'ADMIN_SESSION_HOURS' ] || '8' , 10 ) ;
@@ -1285,7 +1286,9 @@ loadSessions();
12851286 } else {
12861287 this . db . prepare ( 'DELETE FROM admin_sessions WHERE id = ?' ) . run ( verified . jti ) ;
12871288 }
1288- } catch { }
1289+ } catch ( error ) {
1290+ console . warn ( 'Failed to delete session during logout:' , error ) ;
1291+ }
12891292 }
12901293 }
12911294 clearJwtCookie ( res ) ;
You can’t perform that action at this time.
0 commit comments