{"error":"out of shared memory","level":"error","message":"Error fetching borrow records","service":"school-system","stack":"Error\n    at Query.run (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/dialects/postgres/query.js:50:25)\n    at /home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/sequelize.js:315:28\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async PostgresQueryInterface.select (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/dialects/abstract/query-interface.js:407:12)\n    at async BookBorrowing.findAll (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/model.js:1140:21)\n    at async /home/codecan/Documents/softbytes/school_system/backend/routes/borrowing.js:74:31","timestamp":"2026-08-07 10:19:11"}
{"error":"out of shared memory","level":"error","message":"Error fetching borrow records","service":"school-system","stack":"Error\n    at Query.run (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/dialects/postgres/query.js:50:25)\n    at /home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/sequelize.js:315:28\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async PostgresQueryInterface.select (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/dialects/abstract/query-interface.js:407:12)\n    at async BookBorrowing.findAll (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/model.js:1140:21)\n    at async /home/codecan/Documents/softbytes/school_system/backend/routes/borrowing.js:74:31","timestamp":"2026-08-07 10:19:11"}
{"error":"out of shared memory","level":"error","message":"Error fetching overdue books","service":"school-system","stack":"Error\n    at Query.run (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/dialects/postgres/query.js:50:25)\n    at /home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/sequelize.js:315:28\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async PostgresQueryInterface.select (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/dialects/abstract/query-interface.js:407:12)\n    at async BookBorrowing.findAll (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/model.js:1140:21)\n    at async /home/codecan/Documents/softbytes/school_system/backend/routes/borrowing.js:411:30","timestamp":"2026-08-07 10:19:11"}
{"level":"error","message":"out of shared memory","service":"school-system","stack":"Error\n    at Query.run (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/dialects/postgres/query.js:50:25)\n    at /home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/sequelize.js:315:28\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async PostgresQueryInterface.select (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/dialects/abstract/query-interface.js:407:12)\n    at async classes.findAll (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/model.js:1140:21)\n    at async /home/codecan/Documents/softbytes/school_system/backend/routes/classes.js:77:25","timestamp":"2026-08-07 10:19:33"}
{"error":"out of shared memory","level":"error","message":"Error fetching overdue books","service":"school-system","stack":"Error\n    at Query.run (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/dialects/postgres/query.js:50:25)\n    at /home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/sequelize.js:315:28\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async PostgresQueryInterface.select (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/dialects/abstract/query-interface.js:407:12)\n    at async BookBorrowing.findAll (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/model.js:1140:21)\n    at async /home/codecan/Documents/softbytes/school_system/backend/routes/borrowing.js:411:30","timestamp":"2026-08-07 10:19:33"}
{"error":"out of shared memory","level":"error","message":"Error fetching borrow records","service":"school-system","stack":"Error\n    at Query.run (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/dialects/postgres/query.js:50:25)\n    at /home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/sequelize.js:315:28\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async PostgresQueryInterface.select (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/dialects/abstract/query-interface.js:407:12)\n    at async BookBorrowing.findAll (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/model.js:1140:21)\n    at async /home/codecan/Documents/softbytes/school_system/backend/routes/borrowing.js:74:31","timestamp":"2026-08-07 10:19:33"}
{"error":"out of shared memory","level":"error","message":"Error fetching borrow records","service":"school-system","stack":"Error\n    at Query.run (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/dialects/postgres/query.js:50:25)\n    at /home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/sequelize.js:315:28\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async PostgresQueryInterface.select (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/dialects/abstract/query-interface.js:407:12)\n    at async BookBorrowing.findAll (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/model.js:1140:21)\n    at async /home/codecan/Documents/softbytes/school_system/backend/routes/borrowing.js:74:31","timestamp":"2026-08-07 10:20:38"}
{"error":"out of shared memory","level":"error","message":"Error fetching borrow records","service":"school-system","stack":"Error\n    at Query.run (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/dialects/postgres/query.js:50:25)\n    at /home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/sequelize.js:315:28\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async PostgresQueryInterface.select (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/dialects/abstract/query-interface.js:407:12)\n    at async BookBorrowing.findAll (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/model.js:1140:21)\n    at async /home/codecan/Documents/softbytes/school_system/backend/routes/borrowing.js:74:31","timestamp":"2026-08-07 10:20:38"}
{"level":"error","message":"out of shared memory","service":"school-system","stack":"Error\n    at Query.run (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/dialects/postgres/query.js:50:25)\n    at /home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/sequelize.js:315:28\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async PostgresQueryInterface.select (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/dialects/abstract/query-interface.js:407:12)\n    at async classes.findAll (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/model.js:1140:21)\n    at async /home/codecan/Documents/softbytes/school_system/backend/routes/classes.js:77:25","timestamp":"2026-08-07 10:20:38"}
{"level":"error","message":"out of shared memory","service":"school-system","stack":"Error\n    at Query.run (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/dialects/postgres/query.js:50:25)\n    at /home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/sequelize.js:315:28\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async PostgresQueryInterface.select (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/dialects/abstract/query-interface.js:407:12)\n    at async classes.findAll (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/model.js:1140:21)\n    at async /home/codecan/Documents/softbytes/school_system/backend/routes/classes.js:77:25","timestamp":"2026-08-07 10:21:58"}
{"level":"error","message":"out of shared memory","service":"school-system","stack":"Error\n    at Query.run (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/dialects/postgres/query.js:50:25)\n    at /home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/sequelize.js:315:28\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async PostgresQueryInterface.select (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/dialects/abstract/query-interface.js:407:12)\n    at async SchoolSettings.findAll (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/model.js:1140:21)\n    at async SchoolSettings.findOne (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/model.js:1240:12)\n    at async /home/codecan/Documents/softbytes/school_system/backend/routes/schoolSettings.js:51:26","timestamp":"2026-08-07 10:21:58"}
{"level":"error","message":"out of shared memory","service":"school-system","stack":"Error\n    at Query.run (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/dialects/postgres/query.js:50:25)\n    at /home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/sequelize.js:315:28\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async PostgresQueryInterface.select (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/dialects/abstract/query-interface.js:407:12)\n    at async classes.findAll (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/model.js:1140:21)\n    at async /home/codecan/Documents/softbytes/school_system/backend/routes/classes.js:77:25","timestamp":"2026-08-07 10:23:49"}
{"level":"error","message":"out of shared memory","service":"school-system","stack":"Error\n    at Query.run (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/dialects/postgres/query.js:50:25)\n    at /home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/sequelize.js:315:28\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async PostgresQueryInterface.select (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/dialects/abstract/query-interface.js:407:12)\n    at async SchoolSettings.findAll (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/model.js:1140:21)\n    at async SchoolSettings.findOne (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/model.js:1240:12)\n    at async /home/codecan/Documents/softbytes/school_system/backend/routes/schoolSettings.js:51:26","timestamp":"2026-08-07 10:23:49"}
{"level":"error","message":"out of shared memory","service":"school-system","stack":"Error\n    at Query.run (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/dialects/postgres/query.js:50:25)\n    at /home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/sequelize.js:315:28\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async PostgresQueryInterface.select (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/dialects/abstract/query-interface.js:407:12)\n    at async classes.findAll (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/lib/model.js:1140:21)\n    at async /home/codecan/Documents/softbytes/school_system/backend/routes/classes.js:77:25","timestamp":"2026-08-07 10:23:49"}
{"level":"error","message":"Database initialization failed permission denied for schema public","service":"school-system","stack":"Error\n    at Query.run (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/dialects/postgres/query.js:76:25)\n    at <anonymous> (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/sequelize.js:650:28)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async <anonymous> (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/dialects/postgres/query-interface.js:140:49)\n    at async PostgresQueryInterface.ensureEnums (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/dialects/postgres/query-interface.js:139:20)\n    at async PostgresQueryInterface.createTable (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/dialects/abstract/query-interface.js:210:5)\n    at async Function.sync (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/model.js:1353:7)\n    at async Sequelize._syncModelsWithCyclicReferences (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/sequelize.js:856:7)\n    at async SchoolSystemServer.initializeDatabase (/home/codecan/Documents/softbytes/school_system/backend/server.ts:107:17)\n    at async SchoolSystemServer.start (/home/codecan/Documents/softbytes/school_system/backend/server.ts:34:9)","timestamp":"2026-08-25 20:53:41"}
{"level":"error","message":"Database initialization failed permission denied for schema public","service":"school-system","stack":"Error\n    at Query.run (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/dialects/postgres/query.js:76:25)\n    at <anonymous> (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/sequelize.js:650:28)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async <anonymous> (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/dialects/postgres/query-interface.js:140:49)\n    at async PostgresQueryInterface.ensureEnums (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/dialects/postgres/query-interface.js:139:20)\n    at async PostgresQueryInterface.createTable (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/dialects/abstract/query-interface.js:210:5)\n    at async Function.sync (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/model.js:1353:7)\n    at async Sequelize._syncModelsWithCyclicReferences (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/sequelize.js:856:7)\n    at async SchoolSystemServer.initializeDatabase (/home/codecan/Documents/softbytes/school_system/backend/server.ts:107:17)\n    at async SchoolSystemServer.start (/home/codecan/Documents/softbytes/school_system/backend/server.ts:34:9)","timestamp":"2026-08-25 20:54:30"}
{"level":"error","message":"Database initialization failed permission denied for schema public","service":"school-system","stack":"Error\n    at Query.run (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/dialects/postgres/query.js:76:25)\n    at <anonymous> (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/sequelize.js:650:28)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async <anonymous> (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/dialects/postgres/query-interface.js:140:49)\n    at async PostgresQueryInterface.ensureEnums (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/dialects/postgres/query-interface.js:139:20)\n    at async PostgresQueryInterface.createTable (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/dialects/abstract/query-interface.js:210:5)\n    at async Function.sync (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/model.js:1353:7)\n    at async Sequelize._syncModelsWithCyclicReferences (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/sequelize.js:856:7)\n    at async SchoolSystemServer.initializeDatabase (/home/codecan/Documents/softbytes/school_system/backend/server.ts:107:17)\n    at async SchoolSystemServer.start (/home/codecan/Documents/softbytes/school_system/backend/server.ts:34:9)","timestamp":"2026-08-25 21:02:05"}
{"level":"error","message":"Email transporter connection failed getaddrinfo ENOTFOUND mail.softbytetechnologies.com","service":"school-system","stack":"Error: getaddrinfo ENOTFOUND mail.softbytetechnologies.com\n    at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26)","timestamp":"2026-08-25 21:05:05"}
{"level":"error","message":"Email transporter connection failed getaddrinfo ENOTFOUND mail.softbytetechnologies.com","service":"school-system","stack":"Error: getaddrinfo ENOTFOUND mail.softbytetechnologies.com\n    at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26)","timestamp":"2026-08-25 22:21:17"}
{"level":"error","message":"Unhandled error Cannot read properties of undefined (reading 'school_id')","service":"school-system","stack":"TypeError: Cannot read properties of undefined (reading 'school_id')\n    at enforceSchoolMembership (/home/codecan/Documents/softbytes/school_system/backend/middlewares/AuthMiddleware.ts:88:41)\n    at Layer.handleRequest (/home/codecan/Documents/softbytes/school_system/backend/node_modules/router/lib/layer.js:152:17)\n    at next (/home/codecan/Documents/softbytes/school_system/backend/node_modules/router/lib/route.js:157:13)\n    at <anonymous> (/home/codecan/Documents/softbytes/school_system/backend/middlewares/AuthMiddleware.ts:71:20)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2026-08-25 23:23:49"}
{"level":"error","message":"Unhandled error Cannot read properties of undefined (reading 'school_id')","service":"school-system","stack":"TypeError: Cannot read properties of undefined (reading 'school_id')\n    at enforceSchoolMembership (/home/codecan/Documents/softbytes/school_system/backend/middlewares/AuthMiddleware.ts:88:41)\n    at Layer.handleRequest (/home/codecan/Documents/softbytes/school_system/backend/node_modules/router/lib/layer.js:152:17)\n    at next (/home/codecan/Documents/softbytes/school_system/backend/node_modules/router/lib/route.js:157:13)\n    at <anonymous> (/home/codecan/Documents/softbytes/school_system/backend/middlewares/AuthMiddleware.ts:71:20)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2026-08-25 23:23:49"}
{"level":"error","message":"Unhandled error Cannot read properties of undefined (reading 'school_id')","service":"school-system","stack":"TypeError: Cannot read properties of undefined (reading 'school_id')\n    at enforceSchoolMembership (/home/codecan/Documents/softbytes/school_system/backend/middlewares/AuthMiddleware.ts:88:41)\n    at Layer.handleRequest (/home/codecan/Documents/softbytes/school_system/backend/node_modules/router/lib/layer.js:152:17)\n    at next (/home/codecan/Documents/softbytes/school_system/backend/node_modules/router/lib/route.js:157:13)\n    at <anonymous> (/home/codecan/Documents/softbytes/school_system/backend/middlewares/AuthMiddleware.ts:71:20)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2026-08-29 00:40:50"}
{"level":"error","message":"Unhandled error Cannot read properties of undefined (reading 'school_id')","service":"school-system","stack":"TypeError: Cannot read properties of undefined (reading 'school_id')\n    at enforceSchoolMembership (/home/codecan/Documents/softbytes/school_system/backend/middlewares/AuthMiddleware.ts:88:41)\n    at Layer.handleRequest (/home/codecan/Documents/softbytes/school_system/backend/node_modules/router/lib/layer.js:152:17)\n    at next (/home/codecan/Documents/softbytes/school_system/backend/node_modules/router/lib/route.js:157:13)\n    at <anonymous> (/home/codecan/Documents/softbytes/school_system/backend/middlewares/AuthMiddleware.ts:71:20)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2026-08-29 00:40:50"}
{"level":"error","message":"Unhandled error Cannot read properties of undefined (reading 'school_id')","service":"school-system","stack":"TypeError: Cannot read properties of undefined (reading 'school_id')\n    at enforceSchoolMembership (/home/codecan/Documents/softbytes/school_system/backend/middlewares/AuthMiddleware.ts:88:41)\n    at Layer.handleRequest (/home/codecan/Documents/softbytes/school_system/backend/node_modules/router/lib/layer.js:152:17)\n    at next (/home/codecan/Documents/softbytes/school_system/backend/node_modules/router/lib/route.js:157:13)\n    at <anonymous> (/home/codecan/Documents/softbytes/school_system/backend/middlewares/AuthMiddleware.ts:71:20)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2026-08-29 00:41:00"}
{"level":"error","message":"Unhandled error Cannot read properties of undefined (reading 'school_id')","service":"school-system","stack":"TypeError: Cannot read properties of undefined (reading 'school_id')\n    at enforceSchoolMembership (/home/codecan/Documents/softbytes/school_system/backend/middlewares/AuthMiddleware.ts:88:41)\n    at Layer.handleRequest (/home/codecan/Documents/softbytes/school_system/backend/node_modules/router/lib/layer.js:152:17)\n    at next (/home/codecan/Documents/softbytes/school_system/backend/node_modules/router/lib/route.js:157:13)\n    at <anonymous> (/home/codecan/Documents/softbytes/school_system/backend/middlewares/AuthMiddleware.ts:71:20)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2026-08-29 00:41:00"}
{"level":"error","message":"Unhandled error Cannot read properties of undefined (reading 'school_id')","service":"school-system","stack":"TypeError: Cannot read properties of undefined (reading 'school_id')\n    at enforceSchoolMembership (/home/codecan/Documents/softbytes/school_system/backend/middlewares/AuthMiddleware.ts:88:41)\n    at Layer.handleRequest (/home/codecan/Documents/softbytes/school_system/backend/node_modules/router/lib/layer.js:152:17)\n    at next (/home/codecan/Documents/softbytes/school_system/backend/node_modules/router/lib/route.js:157:13)\n    at <anonymous> (/home/codecan/Documents/softbytes/school_system/backend/middlewares/AuthMiddleware.ts:71:20)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2026-08-29 08:10:38"}
{"level":"error","message":"Unhandled error Cannot read properties of undefined (reading 'school_id')","service":"school-system","stack":"TypeError: Cannot read properties of undefined (reading 'school_id')\n    at enforceSchoolMembership (/home/codecan/Documents/softbytes/school_system/backend/middlewares/AuthMiddleware.ts:88:41)\n    at Layer.handleRequest (/home/codecan/Documents/softbytes/school_system/backend/node_modules/router/lib/layer.js:152:17)\n    at next (/home/codecan/Documents/softbytes/school_system/backend/node_modules/router/lib/route.js:157:13)\n    at <anonymous> (/home/codecan/Documents/softbytes/school_system/backend/middlewares/AuthMiddleware.ts:71:20)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2026-08-29 08:11:11"}
{"level":"error","message":"Unhandled error Cannot read properties of undefined (reading 'school_id')","service":"school-system","stack":"TypeError: Cannot read properties of undefined (reading 'school_id')\n    at enforceSchoolMembership (/home/codecan/Documents/softbytes/school_system/backend/middlewares/AuthMiddleware.ts:88:41)\n    at Layer.handleRequest (/home/codecan/Documents/softbytes/school_system/backend/node_modules/router/lib/layer.js:152:17)\n    at next (/home/codecan/Documents/softbytes/school_system/backend/node_modules/router/lib/route.js:157:13)\n    at <anonymous> (/home/codecan/Documents/softbytes/school_system/backend/middlewares/AuthMiddleware.ts:71:20)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2026-08-29 09:29:14"}
{"level":"error","message":"Unhandled error Cannot read properties of undefined (reading 'school_id')","service":"school-system","stack":"TypeError: Cannot read properties of undefined (reading 'school_id')\n    at enforceSchoolMembership (/home/codecan/Documents/softbytes/school_system/backend/middlewares/AuthMiddleware.ts:88:41)\n    at Layer.handleRequest (/home/codecan/Documents/softbytes/school_system/backend/node_modules/router/lib/layer.js:152:17)\n    at next (/home/codecan/Documents/softbytes/school_system/backend/node_modules/router/lib/route.js:157:13)\n    at <anonymous> (/home/codecan/Documents/softbytes/school_system/backend/middlewares/AuthMiddleware.ts:71:20)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2026-09-01 12:52:56"}
{"level":"error","message":"Unhandled error Cannot read properties of undefined (reading 'school_id')","service":"school-system","stack":"TypeError: Cannot read properties of undefined (reading 'school_id')\n    at enforceSchoolMembership (/home/codecan/Documents/softbytes/school_system/backend/middlewares/AuthMiddleware.ts:88:41)\n    at Layer.handleRequest (/home/codecan/Documents/softbytes/school_system/backend/node_modules/router/lib/layer.js:152:17)\n    at next (/home/codecan/Documents/softbytes/school_system/backend/node_modules/router/lib/route.js:157:13)\n    at <anonymous> (/home/codecan/Documents/softbytes/school_system/backend/middlewares/AuthMiddleware.ts:71:20)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2026-09-01 12:52:56"}
{"level":"error","message":"Unhandled error Cannot read properties of undefined (reading 'school_id')","service":"school-system","stack":"TypeError: Cannot read properties of undefined (reading 'school_id')\n    at enforceSchoolMembership (/home/codecan/Documents/softbytes/school_system/backend/middlewares/AuthMiddleware.ts:88:41)\n    at Layer.handleRequest (/home/codecan/Documents/softbytes/school_system/backend/node_modules/router/lib/layer.js:152:17)\n    at next (/home/codecan/Documents/softbytes/school_system/backend/node_modules/router/lib/route.js:157:13)\n    at <anonymous> (/home/codecan/Documents/softbytes/school_system/backend/middlewares/AuthMiddleware.ts:71:20)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2026-09-01 12:53:09"}
{"level":"error","message":"Unhandled error Cannot read properties of undefined (reading 'school_id')","service":"school-system","stack":"TypeError: Cannot read properties of undefined (reading 'school_id')\n    at enforceSchoolMembership (/home/codecan/Documents/softbytes/school_system/backend/middlewares/AuthMiddleware.ts:88:41)\n    at Layer.handleRequest (/home/codecan/Documents/softbytes/school_system/backend/node_modules/router/lib/layer.js:152:17)\n    at next (/home/codecan/Documents/softbytes/school_system/backend/node_modules/router/lib/route.js:157:13)\n    at <anonymous> (/home/codecan/Documents/softbytes/school_system/backend/middlewares/AuthMiddleware.ts:71:20)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2026-09-01 12:53:49"}
{"level":"error","message":"Email transporter connection failed getaddrinfo ENOTFOUND mail.softbytetechnologies.com","service":"school-system","stack":"Error: getaddrinfo ENOTFOUND mail.softbytetechnologies.com\n    at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26)","timestamp":"2026-09-01 15:35:25"}
{"level":"error","message":"Database initialization failed Cannot read properties of null (reading '1')","service":"school-system","stack":"TypeError: Cannot read properties of null (reading '1')\n    at Query.run (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/dialects/postgres/query.js:151:75)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async <anonymous> (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/sequelize.js:650:16)\n    at async PostgresQueryInterface.showIndex (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/dialects/abstract/query-interface.js:600:12)\n    at async Function.sync (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/model.js:1413:29)\n    at async Sequelize._syncModelsWithCyclicReferences (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/sequelize.js:856:7)\n    at async SchoolSystemServer.initializeDatabase (/home/codecan/Documents/softbytes/school_system/backend/server.ts:107:17)\n    at async SchoolSystemServer.start (/home/codecan/Documents/softbytes/school_system/backend/server.ts:34:9)","timestamp":"2026-09-01 20:48:07"}
{"level":"error","message":"Database initialization failed Unknown constraint error","service":"school-system","stack":"Error\n    at Query.run (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/dialects/postgres/query.js:76:25)\n    at <anonymous> (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/sequelize.js:650:28)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async Function.sync (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/model.js:1402:17)\n    at async Sequelize._syncModelsWithCyclicReferences (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/sequelize.js:861:7)\n    at async SchoolSystemServer.initializeDatabase (/home/codecan/Documents/softbytes/school_system/backend/server.ts:107:17)\n    at async SchoolSystemServer.start (/home/codecan/Documents/softbytes/school_system/backend/server.ts:34:9)","timestamp":"2026-09-01 20:48:47"}
{"level":"error","message":"Database initialization failed Cannot read properties of null (reading '1')","service":"school-system","stack":"TypeError: Cannot read properties of null (reading '1')\n    at Query.run (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/dialects/postgres/query.js:151:75)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async <anonymous> (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/sequelize.js:650:16)\n    at async PostgresQueryInterface.showIndex (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/dialects/abstract/query-interface.js:600:12)\n    at async Function.sync (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/model.js:1413:29)\n    at async Sequelize._syncModelsWithCyclicReferences (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/sequelize.js:856:7)\n    at async SchoolSystemServer.initializeDatabase (/home/codecan/Documents/softbytes/school_system/backend/server.ts:107:17)\n    at async SchoolSystemServer.start (/home/codecan/Documents/softbytes/school_system/backend/server.ts:34:9)","timestamp":"2026-09-01 20:48:58"}
{"level":"error","message":"Database initialization failed Cannot read properties of null (reading '1')","service":"school-system","stack":"TypeError: Cannot read properties of null (reading '1')\n    at Query.run (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/dialects/postgres/query.js:151:75)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async <anonymous> (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/sequelize.js:650:16)\n    at async PostgresQueryInterface.showIndex (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/dialects/abstract/query-interface.js:600:12)\n    at async Function.sync (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/model.js:1413:29)\n    at async Sequelize._syncModelsWithCyclicReferences (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/sequelize.js:856:7)\n    at async SchoolSystemServer.initializeDatabase (/home/codecan/Documents/softbytes/school_system/backend/server.ts:107:17)\n    at async SchoolSystemServer.start (/home/codecan/Documents/softbytes/school_system/backend/server.ts:34:9)","timestamp":"2026-09-01 20:49:36"}
{"level":"error","message":"Database initialization failed Unknown constraint error","service":"school-system","stack":"Error\n    at Query.run (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/dialects/postgres/query.js:76:25)\n    at <anonymous> (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/sequelize.js:650:28)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async Function.sync (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/model.js:1402:17)\n    at async Sequelize._syncModelsWithCyclicReferences (/home/codecan/Documents/softbytes/school_system/backend/node_modules/sequelize/src/sequelize.js:856:7)\n    at async SchoolSystemServer.initializeDatabase (/home/codecan/Documents/softbytes/school_system/backend/server.ts:107:17)\n    at async SchoolSystemServer.start (/home/codecan/Documents/softbytes/school_system/backend/server.ts:34:9)","timestamp":"2026-09-01 20:50:36"}
{"body":"\n                {\n                  \"statusCode\": 4000,\n                  \"statusMessage\": \"Unauthorised.\",\n                  \"supportMessage\": \"Please verify token environment and key.\",\n                  \"faultMessage1\" : \"oauth.v2.InvalidAccessToken\",\n                  \"faultMessage2\" : \"\"\n                }\n            ","level":"error","message":"MTN SMS token request rejected","service":"school-system","status":401,"statusText":"Unauthorized","timestamp":"2026-09-07 01:19:48"}
{"body":{"messages":[{"error":{"message":"Recipient not allowed in sandbox"}}]},"level":"error","message":"MTN SMS gateway reported a send failure","recipient":"256755113122","service":"school-system","timestamp":"2026-09-07 01:38:34"}
{"body":{"faultMessage1":"oauth.v2.InvalidAccessToken","statusCode":4000,"statusMessage":"Unauthorised.","supportMessage":"Please verify token environment and key."},"level":"error","message":"MTN SMS token request rejected","service":"school-system","status":401,"statusText":"","timestamp":"2026-09-07 01:38:34"}
{"body":{"messages":[{"error":{"message":"Recipient not allowed in sandbox"}}]},"level":"error","message":"MTN SMS gateway reported a send failure","recipient":"256755113122","service":"school-system","timestamp":"2026-09-07 01:40:30"}
{"body":{"faultMessage1":"oauth.v2.InvalidAccessToken","statusCode":4000,"statusMessage":"Unauthorised.","supportMessage":"Please verify token environment and key."},"level":"error","message":"MTN SMS token request rejected","service":"school-system","status":401,"statusText":"","timestamp":"2026-09-07 01:40:30"}
{"body":{"faultMessage1":"keymanagement.service.InvalidAPICallAsNoApiProductMatchFound","faultMessage2":"","statusCode":4000,"statusMessage":"Unauthorised.","supportMessage":"Please verify token environment and key."},"level":"error","message":"MTN SMS gateway rejected request","recipient":"256777980098","service":"school-system","status":401,"statusText":"Unauthorized","timestamp":"2026-09-07 01:42:50"}
{"body":{"faultMessage1":"keymanagement.service.InvalidAPICallAsNoApiProductMatchFound","faultMessage2":"","statusCode":4000,"statusMessage":"Unauthorised.","supportMessage":"Please verify token environment and key."},"level":"error","message":"MTN SMS gateway rejected request","recipient":"256777980098","service":"school-system","status":401,"statusText":"Unauthorized","timestamp":"2026-09-07 01:43:17"}
{"body":{"faultMessage1":"keymanagement.service.InvalidAPICallAsNoApiProductMatchFound","faultMessage2":"","statusCode":4000,"statusMessage":"Unauthorised.","supportMessage":"Please verify token environment and key."},"level":"error","message":"MTN SMS gateway rejected request","recipient":"256777980098","service":"school-system","status":401,"statusText":"Unauthorized","timestamp":"2026-09-07 01:43:35"}
{"body":{"messages":[{"error":{"message":"Recipient not allowed in sandbox"}}]},"level":"error","message":"MTN SMS gateway reported a send failure","recipient":"256755113122","service":"school-system","timestamp":"2026-09-07 01:51:21"}
{"body":{"faultMessage1":"oauth.v2.InvalidAccessToken","statusCode":4000,"statusMessage":"Unauthorised.","supportMessage":"Please verify token environment and key."},"level":"error","message":"MTN SMS token request rejected","service":"school-system","status":401,"statusText":"","timestamp":"2026-09-07 01:51:21"}
