-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Labels
backendWork related to improving the Compass API. More than 70% of the PR should be backend focused.Work related to improving the Compass API. More than 70% of the PR should be backend focused.webFrontend/web related issueFrontend/web related issue
Description
Where did this happen?
Hosted (app.compasscalendar.com)
Expected Behavior
After the backend receives an invalid_grant (Token has been expired or revoked) error, it should prune the google data and send a websocket notification to the client if connected. Then the client should refetch data and display a toast saying that Google data was removed due to access revoked.
Current Behavior
After the backend receives the grant error from the Google API request, it logs the invalid grant error and returns 400 for PUT /api/event/<id> with an empty response. However, it does not clean its data.
Steps to Reproduce
- Connect Google calendar account
- Revoke Google Access for Compass
- Make a change in Google, which'll trigger a webhook
- The backend will receive the GCal webhook and trigger a GET for the Google events, which'll trigger the invalid grant.
- The backend will respond with 400
POST /api/sync/gcal/notifications - No change appears on the UI.
- In Compass UI, edit an existing event, trigger a PUT
- Backend responds with
400 PUT /api/event/<eventId> - UI displays alert saying
AxiosError: Request failed with status code 400
Possible Solution
Ensure the backend parses the error and cleans the data (it was working in previous version of code).
To improve the UX, ensure the backend notifies the client when this happens.
Context
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
backendWork related to improving the Compass API. More than 70% of the PR should be backend focused.Work related to improving the Compass API. More than 70% of the PR should be backend focused.webFrontend/web related issueFrontend/web related issue
Type
Projects
Status
Backlog