MCPcopy
hub / github.com/simstudioai/sim / markTableUpdateFailed

Function markTableUpdateFailed

apps/sim/lib/table/update-runner.ts:181–196  ·  view source on GitHub ↗
(
  tableId: string,
  jobId: string,
  error: unknown
)

Source from the content-addressed store, hash-verified

179 * no-op if a newer job has taken over.
180 */
181export 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}

Callers 3

dispatchUpdateJobFunction · 0.90
table-update.tsFile · 0.90

Calls 5

truncateFunction · 0.90
getErrorMessageFunction · 0.90
toErrorFunction · 0.90
markJobFailedFunction · 0.90
appendTableEventFunction · 0.90

Tested by

no test coverage detected