sfmc // AMPscriptSTUDY
RaiseError() for a Broken Recipient, Not Segmentation
Abort only the current recipient when a genuine rendering invariant is violated.
ampscriptraiseerrorerror handling
Trust & provenanceSTUDY
Evidence tierSTUDYOfficial sources1Other sources0Last verified2026-10-05
Evidence tier describes my hands-on relationship with the content. Official sources describe platform contracts/documentation. Production observations should not automatically be treated as official limits.
A required invariant is missing and sending the message would be unsafe/wrong.
%%[
VAR @customerId
SET @customerId = AttributeValue("CustomerId")
IF Empty(@customerId) THEN
RaiseError("CustomerId missing", true)
ENDIF
]%%With boolSkipCurrentOnly=true, RaiseError skips the current recipient and allows the rest of the job to continue.
Salesforce recommends RaiseError for errors, not audience segmentation.
Tracking/reporting can still include emails that were not sent because RaiseError was called.