Sage's own file attachment settings do not allow a copied file for the record's module. 422. Nothing is written.
OPDC API error code
ATTACHMENTS_NOT_ALLOWED_BY_SAGE
HTTP status 422
The API answers with a problem document (RFC 9457) whose type is https://twinn.engineering/errors/attachments-not-allowed-by-sage, and with X-Error-Code: ATTACHMENTS_NOT_ALLOWED_BY_SAGE. Branch on the code, never on the detail text.