You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given that the backend has a notification from google about an event change
And the user with the change is not currently connected to compass via websockets
Then the backend should not attempt to emit the update to the user's client
And the backend should not throw and error
Current Behavior
Backend throws and logs error.
74|backend | 400 POST /api/sync/gcal/notifications 265.820ms Thu, 03 Oct 2024 15:42:06 GMT
74|backend | 24-10-03 15:55:08 [debug] app:sync.service.helpers: updating: "💸 Some Event"| xyz
74|backend | 24-10-03 15:55:08 [warn] app:websocket.server: Event update not sent to client due to missing userId: some-user-id
74|backend | 24-10-03 15:55:08 [error] app:sync.controller: Not sure how to handle this error:
74|backend | 24-10-03 15:55:08 [error] app:sync.controller: Invalid socket id {
74|backend |"result": "Event update not sent to client",
74|backend |"description": "Invalid socket id",
74|backend |"statusCode": 400,
74|backend |"isOperational": true,
74|backend |"stack": "Error: Invalid socket id\n at new BaseError (/compass/packages/core/src/errors/errors.base.ts:23:11)\n at error (/compass/packages/backend/src/common/errors/handlers/error.handler.ts:9:10)\n at notifyClient (/compass/packages/backend/src/servers/websocket/websocket.server.ts:34:16)\n at SyncService.<anonymous> (/compass/packages/backend/src/sync/services/sync.service.ts:97:17)\n at Generator.next (<anonymous>)\n at fulfilled (/compass/build/node/node_modules/tslib/tslib.js:166:62)\n at runMicrotasks (<anonymous>)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)"
74|backend | }
Steps to Reproduce
Close any browser windows with connection to Compass app
Make change in Google cal
See compass backend logs
Possible Solution (Not obligatory)
Instead of throwing error in this scenario, just log a debug message
Context
This doesn't affect users directly. It's more of a dev inconvenience, because now the logs show errors during normal behavior
The text was updated successfully, but these errors were encountered:
Prerequisites
Expected Behavior
Given that the backend has a notification from google about an event change
And the user with the change is not currently connected to compass via websockets
Then the backend should not attempt to emit the update to the user's client
And the backend should not throw and error
Current Behavior
Backend throws and logs error.
Steps to Reproduce
Close any browser windows with connection to Compass app
Make change in Google cal
See compass backend logs
Possible Solution (Not obligatory)
Instead of throwing error in this scenario, just log a debug message
Context
This doesn't affect users directly. It's more of a dev inconvenience, because now the logs show errors during normal behavior
The text was updated successfully, but these errors were encountered: