Skip to content

Commit

Permalink
Persist failed submission event
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeh committed Sep 25, 2023
1 parent e2ee8c1 commit 73bafe4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ export class ProjectCostSurfaceApiEvents
async event(
projectId: string,
state: ProjectCostSurfaceState,
context?: Record<string, unknown>,
): Promise<void> {
await this.create({
data: {},
data: context ?? {},
topic: projectId,
kind: this.eventsMap[state],
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class CreateProjectCostSurfaceHandler
error: unknown,
) => {
this.logger.error(
`Failed submitting update-cost-surface-for-${projectId} job`,
`Failed submitting cost-surface-for-${projectId} job`,
String(error),
);
await this.events.event(
Expand Down

0 comments on commit 73bafe4

Please sign in to comment.