diff --git a/.changeset/sys-email-error-description-widen.md b/.changeset/sys-email-error-description-widen.md new file mode 100644 index 0000000000..e27ce70c96 --- /dev/null +++ b/.changeset/sys-email-error-description-widen.md @@ -0,0 +1,22 @@ +--- +"@objectstack/platform-objects": patch +--- + +fix(platform-objects): `sys_email.error` field help now covers pre-delivery rejections, not only transport failures + +`sys_email.error` was declared as *"Transport error message when status=failed"*. +Since `EmailService.recordRejectedMessage` landed, the same column also carries +the reason a message was rejected by `normalizeMessage` **before** it reached a +transport (an unsendable `from`, no recipient, no subject, no body) — those rows +are written with `status: 'failed'` too, prefixed `rejected before delivery: `. + +Nothing was misleading in the *data*: the row prefixes its own reason, so an +operator reading a failed row is never sent chasing an SMTP host for a message +that never reached one. What was stale was the field's declared `description`, +which Studio surfaces as the field's help text — it named only the transport +case, narrower than what the column has held since that change landed. + +The description now reads: *"Why the message failed — a transport error, or the +validation that rejected it before delivery."* It stays true under both row +shapes and deliberately does not name the row's own `rejected before delivery:` +prefix, so it will not go stale again if that prefix's wording changes. diff --git a/packages/platform-objects/src/apps/translations/en.objects.generated.ts b/packages/platform-objects/src/apps/translations/en.objects.generated.ts index ed722edf31..61f17e21e7 100644 --- a/packages/platform-objects/src/apps/translations/en.objects.generated.ts +++ b/packages/platform-objects/src/apps/translations/en.objects.generated.ts @@ -2476,7 +2476,7 @@ export const enObjects: NonNullable = { }, error: { label: "Error", - help: "Transport error message when status=failed" + help: "Why the message failed — a transport error, or the validation that rejected it before delivery." }, attempt_count: { label: "Attempts", diff --git a/packages/platform-objects/src/audit/sys-email.object.ts b/packages/platform-objects/src/audit/sys-email.object.ts index 073cee51bf..c154aba052 100644 --- a/packages/platform-objects/src/audit/sys-email.object.ts +++ b/packages/platform-objects/src/audit/sys-email.object.ts @@ -192,7 +192,8 @@ export const SysEmail = ObjectSchema.create({ error: Field.textarea({ label: 'Error', required: false, - description: 'Transport error message when status=failed', + description: + 'Why the message failed — a transport error, or the validation that rejected it before delivery.', group: 'State', }),