Use format strings in console.error calls !6
1 file changed, +3 −3
Layout: unified · split
src/index.ts +3 −3
| @@ -102,7 +102,7 @@ export default { | ||
| 102 | 102 | message.ack(); |
| 103 | 103 | } catch (err) { |
| 104 | 104 | const job = message.body; |
| 105 | console.error(`Export ${job.jobId} failed:`, err); | |
| 105 | console.error("Export %s failed:", job.jobId, err); | |
| 106 | 106 | try { |
| 107 | 107 | await env.DB.prepare( |
| 108 | 108 | "UPDATE exports SET status = 'error', error = ?1, completed_at = ?2 WHERE id = ?3", |
| @@ -112,7 +112,7 @@ export default { | ||
| 112 | 112 | } catch (recordErr) { |
| 113 | 113 | // Recording the failure must not stop the ack below, or a |
| 114 | 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 | 117 | // Rendering failure is deterministic (bad data / bug), not transient — |
| 118 | 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 | 665 | try { |
| 666 | 666 | await pollInstallation(env, session.installationId, summary); |
| 667 | 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 | 670 | return Response.redirect(new URL("/", request.url).toString(), 303); |
| 671 | 671 | } |