Skip to content

400 error cannot update gcal event without id after editing an event in Compass #1495

@tyler-dane

Description

@tyler-dane

Where did this happen?

Hosted (app.compasscalendar.com), Local code with an up-to-date main branch

Expected Behavior

After a user creates a Compass event in an account that's connected to Google, they should be able to create a new compass event and then edit it

Current Behavior

After creating a Compass event, the user gets a 204 No Content from the POST request, but then a 400 for the PUT request with no response body.

Steps to Reproduce

  1. Create a Compass event
  2. Wait for the backend to process it. The logs will show something like this
0|backend  | 26-03-02 00:05:23 [debug] app.gcal.sync.processor: Processing 1 event(s)...
0|backend  | 26-03-02 00:05:23 [info] app.gcal.sync.processor: Handle Gcal event(REDACTED): STANDALONE->>STANDALONE_CONFIRMED
0|backend  | 26-03-02 00:05:23 [info] app.event.classes.gcal.parser: UPSERTING STANDALONE->>STANDALONE_CONFIRMED: REDACTED (Gcal)
0|backend  | PROCESSED: [
0|backend  |   {
0|backend  |     title: 'yui789',
0|backend  |     transition: [ 'STANDALONE', 'STANDALONE_CONFIRMED' ],
0|backend  |     category: 'STANDALONE',
0|backend  |     operation: 'STANDALONE_UPDATED'
0|backend  |   }
0|backend  | ]
0|backend  | 26-03-02 00:05:23 [info] app:sync.service: GCal Notification for user: 69177bd4b6b879113d279d5d, calendarId: REDACTED@gmail.com PROCESSED AND NOTIFIED CLIENT
  1. Edit the new event in Compass
  2. See backend error about how the event doesn't have a google id

Possible Solution

Could be related to optimistic rendering and how we need to update the client with the correct google event id once it's created.

Context

Marked needs more info due to not being able to reproduce consistently

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendWork related to improving the Compass API. More than 70% of the PR should be backend focused.needs more infoNot ready for coding just yet

    Type

    Projects

    Status

    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions