You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error response from Composite API, specifically, the statusCode attribute is not mapped to SaveError properly.
Sample Response
{
"success" : false,
"errors" : [
{
"statusCode" : "DUPLICATES_DETECTED",
"message" : "Use one of these records?",
"fields" : [ ]
}
]
}
Expected Behaviour
Error responses' statusCode is mapped properly to SaveError while still correctly mapping errorCode as is. Optionally, depending on the implementation approach, SaveError type is modified to accommodate the statusCode.
Actual Behaviour
During runtime, the error response object contains statusCode instead of errorCode. This slips through the type and value checks in the logic.
Workaround
Manually ensure statusCode attribute's presence and extract it for further usage.
Additional Details
Salesforce API version: v65.0
Node version: 26
Library version: 3.10.28
Use case: Create one or many Asset rows with external IDs which fails sometime due to duplicates.
Activity