Skip to content

Creating ApiKey crashes server (no queries possible) #4675

Closed
@brendanlaschke

Description

Bug Description

On the main branch after creating an api key the server crashes (is in a state where a lot of queries just fail)

Bildschirmaufnahme.2024-03-26.um.22.41.25.mov
/app/packages/twenty-server/src/engine/workspace-datasource/workspace-datasource.service.ts:127
      throw new Error(
            ^
Error: Error executing raw query for workspace 20202020-1c25-4d02-bf25-6aeccf7ea419: column "apiKeyId" of relation "event" does not exist
    at WorkspaceDataSourceService.executeRawQuery (/app/packages/twenty-server/src/engine/workspace-datasource/workspace-datasource.service.ts:127:13)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at EventRepository.insert (/app/packages/twenty-server/src/modules/event/repositiories/event.repository.ts:22:5)
    at SaveEventToDbJob.handle (/app/packages/twenty-server/src/engine/api/graphql/workspace-query-runner/jobs/save-event-to-db.job.ts:49:5)
    at SyncDriver.add (/app/packages/twenty-server/src/engine/integrations/message-queue/drivers/sync.driver.ts:29:5)

Expected behavior

No crash? :D

Technical inputs

Event related error. I think these are valuable events but we need a system to create generic events without writing an apiKeyId/... in a dedicated column...

Related a bit to #4631

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions