( tableId: string, jobId: string, error: unknown )
| 179 | * no-op if a newer job has taken over. |
| 180 | */ |
| 181 | export async function markTableUpdateFailed( |
| 182 | tableId: string, |
| 183 | jobId: string, |
| 184 | error: unknown |
| 185 | ): Promise<void> { |
| 186 | const message = truncate(getErrorMessage(toError(error).cause ?? error, 'Update failed'), 500) |
| 187 | await markJobFailed(tableId, jobId, message).catch(() => {}) |
| 188 | void appendTableEvent({ |
| 189 | kind: 'job', |
| 190 | type: 'update', |
| 191 | tableId, |
| 192 | jobId, |
| 193 | status: 'failed', |
| 194 | error: message, |
| 195 | }) |
| 196 | } |
no test coverage detected