@teamscala/service-boot 0.23.468 → 0.23.469

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  },
7
7
  "name": "@teamscala/service-boot",
8
8
  "type": "module",
9
- "version": "0.23.468",
9
+ "version": "0.23.469",
10
10
  "sideEffects": false,
11
11
  "imports": {
12
12
  "#service-boot/*": "./src/*",
@@ -35,6 +35,7 @@ import { os } from "@orpc/server";
35
35
  import * as v from "valibot";
36
36
  import { getAppLogger } from "@teamscala/logger/app-loggers";
37
37
  import { queryRows } from "@teamscala/db/query-rows";
38
+ import { recordEvent } from "@teamscala/event-log/record-event";
38
39
  import type { PrismaClient } from "@teamscala/db/client";
39
40
  import { signAgreementAccessToken } from "@teamscala/document-signing/agreement-access-token";
40
41
  import {
@@ -316,9 +317,32 @@ export const publicAgreementRouter = {
316
317
  error: "This agreement has no signers recorded and cannot be signed.",
317
318
  };
318
319
  } catch (err) {
319
- log.error(
320
- `[publicAgreement.sign] failed: ${err instanceof Error ? err.message : String(err)}`,
321
- );
320
+ const detail = err instanceof Error ? err.message : String(err);
321
+ log.error(`[publicAgreement.sign] failed: ${detail}`);
322
+ // A LOG LINE IS NOT A RECORD. Measured 2026-09-03: signing was broken
323
+ // for every signer for hours -- first a 404 on the procedure, then a
324
+ // Prisma 8 codec rejecting the timestamp write -- and error_logs held
325
+ // ZERO rows the whole time. The page returned 200, the service was
326
+ // running, the deploy was green, and the signer saw only "Could not
327
+ // submit your signature.", which reads as transient and invites a
328
+ // retry that fails identically. The failure was discovered by a human
329
+ // being unable to sign, which is the same shape as
330
+ // page-server.render.failed above and takes the same cure: emit a
331
+ // durable event so a surface can answer "is signing failing" without
332
+ // somebody attempting a signature.
333
+ //
334
+ // Fire-and-forget and last: telemetry may never change what the signer
335
+ // is served, and this path is already handling a failure
336
+ // (observability-is-passive). The agreement id and the signer role
337
+ // make a recorded event lead to the specific failure.
338
+ recordEvent({
339
+ kind: "agreement.sign.failed",
340
+ payload: {
341
+ agreementId,
342
+ error: detail.slice(0, 500),
343
+ errorName: err instanceof Error ? err.name : "unknown",
344
+ },
345
+ });
322
346
  return { ok: false as const, error: "Could not submit your signature." };
323
347
  }
324
348
  }),