I often use the RaiseError function (https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-programmatic-content.meta/mc-programmatic-content/ssjs_platformUtilityRaiseError.htm) in SSJS on emails.

I see the documentation usually using it like

Platform.Function.RaiseError("Error description",false,"statusCode","3");

What do the statusCode and errorCode do though? I see it is usually just set to "3" but I couldn't find any documentation around why or what 3 even means?

I have seen this previous question How to use all the parameters of the RaiseError function? but I'm not sure if that's even relevant to SSJS.

1 Answer 1


You are correct that the question How to use all the parameters of the RaiseError function? is not about SSJS, but instead about the AMPscript function.

  1. Error Code: This is where you would enter the API error code (number only) you want associated with the error you are raising via the function. This can then be used as an easy reference in a send log or similar data source - similar to any innate errors that SFMC would throw.
  2. Status Code:* This is the custom 'message' you want stored inside the send log or similar error tracking data source for reference and to provide more details about the error received. This is different from the 'Error Message' (first parameter) as it is not displayed to the user, but only stored internally and different than Error Code as this is a string, not a number.

*Please note that in the referenced link that 'Status Code' would be considered the 'Message' column.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .