Commit b765f11c0d
Verified · cmc
Layout: unified · split
src/index.ts +3 −3
| @@ -102,7 +102,7 @@ export default { | |||
| 102 | message.ack(); | 102 | message.ack(); |
| 103 | } catch (err) { | 103 | } catch (err) { |
| 104 | const job = message.body; | 104 | const job = message.body; |
| 105 | console.error(`Export ${job.jobId} failed:`, err); | 105 | console.error("Export %s failed:", job.jobId, err); |
| 106 | try { | 106 | try { |
| 107 | await env.DB.prepare( | 107 | await env.DB.prepare( |
| 108 | "UPDATE exports SET status = 'error', error = ?1, completed_at = ?2 WHERE id = ?3", | 108 | "UPDATE exports SET status = 'error', error = ?1, completed_at = ?2 WHERE id = ?3", |
| @@ -112,7 +112,7 @@ export default { | |||
| 112 | } catch (recordErr) { | 112 | } catch (recordErr) { |
| 113 | // Recording the failure must not stop the ack below, or a | 113 | // Recording the failure must not stop the ack below, or a |
| 114 | // deterministic render error would be retried to the DLQ limit. | 114 | // deterministic render error would be retried to the DLQ limit. |
| 115 | console.error(`Could not record export failure for ${job.jobId}:`, recordErr); | 115 | console.error("Could not record export failure for %s:", job.jobId, recordErr); |
| 116 | } | 116 | } |
| 117 | // Rendering failure is deterministic (bad data / bug), not transient — | 117 | // Rendering failure is deterministic (bad data / bug), not transient — |
| 118 | // don't retry, the error is recorded for the operator. | 118 | // don't retry, the error is recorded for the operator. |
| @@ -665,7 +665,7 @@ async function handleResync(request: Request, env: Env): Promise<Response> { | |||
| 665 | try { | 665 | try { |
| 666 | await pollInstallation(env, session.installationId, summary); | 666 | await pollInstallation(env, session.installationId, summary); |
| 667 | } catch (err) { | 667 | } catch (err) { |
| 668 | console.error(`Resync failed for installation ${session.installationId}:`, err); | 668 | console.error("Resync failed for installation %s:", session.installationId, err); |
| 669 | } | 669 | } |
| 670 | return Response.redirect(new URL("/", request.url).toString(), 303); | 670 | return Response.redirect(new URL("/", request.url).toString(), 303); |
| 671 | } | 671 | } |