A Salesforce CLI Plugin that enables and enhances implementation of the SFDX-Falcon family of projects, including the AppExchange Demo Kit (ADK) and AppExchange Package Kit (APK)
When the Salesforce CLI command force:data:tree:import fails, detailed failure information appears as a string representation of JSON data inside of the CLI's JSON response.
This output looks like this when the error details are shown to the user after the falcon:adk:install command fails:
If this data was parsed as an additional JSON object, it could be displayed to the user as something like this:
{
"hasErrors": true,
"results": [
{
"referenceId": "FinServ__RollupByLookupConfig__cRef3",
"errors": [
{
"statusCode": "FIELD_CUSTOM_VALIDATION_EXCEPTION",
"message": "You've reached the maximum of 50 active configuration items.",
"fields": [
]
}
]
},
{
"referenceId": "FinServ__RollupByLookupConfig__cRef5",
"errors": [
{
"statusCode": "FIELD_CUSTOM_VALIDATION_EXCEPTION",
"message": "You've reached the maximum of 50 active configuration items.",
"fields": [
]
}
]
},
{
"referenceId": "FinServ__RollupByLookupConfig__cRef7",
"errors": [
{
"statusCode": "FIELD_CUSTOM_VALIDATION_EXCEPTION",
"message": "You've reached the maximum of 50 active configuration items.",
"fields": [
]
}
]
},
{
"referenceId": "FinServ__RollupByLookupConfig__cRef8",
"errors": [
{
"statusCode": "FIELD_CUSTOM_VALIDATION_EXCEPTION",
"message": "You've reached the maximum of 50 active configuration items.",
"fields": [
]
}
]
},
{
"referenceId": "FinServ__RollupByLookupConfig__cRef9",
"errors": [
{
"statusCode": "FIELD_CUSTOM_VALIDATION_EXCEPTION",
"message": "You've reached the maximum of 50 active configuration items.",
"fields": [
]
}
]
},
{
"referenceId": "FinServ__RollupByLookupConfig__cRef10",
"errors": [
{
"statusCode": "FIELD_CUSTOM_VALIDATION_EXCEPTION",
"message": "You've reached the maximum of 50 active configuration items.",
"fields": [
]
}
]
},
{
"referenceId": "FinServ__RollupByLookupConfig__cRef11",
"errors": [
{
"statusCode": "FIELD_CUSTOM_VALIDATION_EXCEPTION",
"message": "You've reached the maximum of 50 active configuration items.",
"fields": [
]
}
]
},
{
"referenceId": "FinServ__RollupByLookupConfig__cRef12",
"errors": [
{
"statusCode": "FIELD_CUSTOM_VALIDATION_EXCEPTION",
"message": "You've reached the maximum of 50 active configuration items.",
"fields": [
]
}
]
},
{
"referenceId": "FinServ__RollupByLookupConfig__cRef13",
"errors": [
{
"statusCode": "FIELD_CUSTOM_VALIDATION_EXCEPTION",
"message": "You've reached the maximum of 50 active configuration items.",
"fields": [
]
}
]
},
{
"referenceId": "FinServ__RollupByLookupConfig__cRef14",
"errors": [
{
"statusCode": "FIELD_CUSTOM_VALIDATION_EXCEPTION",
"message": "You've reached the maximum of 50 active configuration items.",
"fields": [
]
}
]
},
{
"referenceId": "FinServ__RollupByLookupConfig__cRef15",
"errors": [
{
"statusCode": "FIELD_CUSTOM_VALIDATION_EXCEPTION",
"message": "You've reached the maximum of 50 active configuration items.",
"fields": [
]
}
]
},
{
"referenceId": "FinServ__RollupByLookupConfig__cRef16",
"errors": [
{
"statusCode": "FIELD_CUSTOM_VALIDATION_EXCEPTION",
"message": "You've reached the maximum of 50 active configuration items.",
"fields": [
]
}
]
},
{
"referenceId": "FinServ__RollupByLookupConfig__cRef17",
"errors": [
{
"statusCode": "FIELD_CUSTOM_VALIDATION_EXCEPTION",
"message": "You've reached the maximum of 50 active configuration items.",
"fields": [
]
}
]
},
{
"referenceId": "FinServ__RollupByLookupConfig__cRef18",
"errors": [
{
"statusCode": "FIELD_CUSTOM_VALIDATION_EXCEPTION",
"message": "You've reached the maximum of 50 active configuration items.",
"fields": [
]
}
]
},
{
"referenceId": "FinServ__RollupByLookupConfig__cRef19",
"errors": [
{
"statusCode": "FIELD_CUSTOM_VALIDATION_EXCEPTION",
"message": "You've reached the maximum of 50 active configuration items.",
"fields": [
]
}
]
},
{
"referenceId": "FinServ__RollupByLookupConfig__cRef20",
"errors": [
{
"statusCode": "FIELD_CUSTOM_VALIDATION_EXCEPTION",
"message": "You've reached the maximum of 50 active configuration items.",
"fields": [
]
}
]
},
{
"referenceId": "FinServ__RollupByLookupConfig__cRef21",
"errors": [
{
"statusCode": "FIELD_CUSTOM_VALIDATION_EXCEPTION",
"message": "You've reached the maximum of 50 active configuration items.",
"fields": [
]
}
]
},
{
"referenceId": "FinServ__RollupByLookupConfig__cRef22",
"errors": [
{
"statusCode": "FIELD_CUSTOM_VALIDATION_EXCEPTION",
"message": "You've reached the maximum of 50 active configuration items.",
"fields": [
]
}
]
},
{
"referenceId": "FinServ__RollupByLookupConfig__cRef23",
"errors": [
{
"statusCode": "FIELD_CUSTOM_VALIDATION_EXCEPTION",
"message": "You've reached the maximum of 50 active configuration items.",
"fields": [
]
}
]
},
{
"referenceId": "FinServ__RollupByLookupConfig__cRef24",
"errors": [
{
"statusCode": "FIELD_CUSTOM_VALIDATION_EXCEPTION",
"message": "You've reached the maximum of 50 active configuration items.",
"fields": [
]
}
]
},
{
"referenceId": "FinServ__RollupByLookupConfig__cRef25",
"errors": [
{
"statusCode": "FIELD_CUSTOM_VALIDATION_EXCEPTION",
"message": "You've reached the maximum of 50 active configuration items.",
"fields": [
]
}
]
},
{
"referenceId": "FinServ__RollupByLookupConfig__cRef26",
"errors": [
{
"statusCode": "FIELD_CUSTOM_VALIDATION_EXCEPTION",
"message": "You've reached the maximum of 50 active configuration items.",
"fields": [
]
}
]
},
{
"referenceId": "FinServ__RollupByLookupConfig__cRef27",
"errors": [
{
"statusCode": "FIELD_CUSTOM_VALIDATION_EXCEPTION",
"message": "You've reached the maximum of 50 active configuration items.",
"fields": [
]
}
]
},
{
"referenceId": "FinServ__RollupByLookupConfig__cRef28",
"errors": [
{
"statusCode": "FIELD_CUSTOM_VALIDATION_EXCEPTION",
"message": "You've reached the maximum of 50 active configuration items.",
"fields": [
]
}
]
},
{
"referenceId": "FinServ__RollupByLookupConfig__cRef29",
"errors": [
{
"statusCode": "FIELD_CUSTOM_VALIDATION_EXCEPTION",
"message": "You've reached the maximum of 50 active configuration items.",
"fields": [
]
}
]
},
{
"referenceId": "FinServ__RollupByLookupConfig__cRef30",
"errors": [
{
"statusCode": "FIELD_CUSTOM_VALIDATION_EXCEPTION",
"message": "You've reached the maximum of 50 active configuration items.",
"fields": [
]
}
]
},
{
"referenceId": "FinServ__RollupByLookupConfig__cRef35",
"errors": [
{
"statusCode": "FIELD_CUSTOM_VALIDATION_EXCEPTION",
"message": "You've reached the maximum of 50 active configuration items.",
"fields": [
]
}
]
},
{
"referenceId": "FinServ__RollupByLookupConfig__cRef38",
"errors": [
{
"statusCode": "FIELD_CUSTOM_VALIDATION_EXCEPTION",
"message": "You've reached the maximum of 50 active configuration items.",
"fields": [
]
}
]
},
{
"referenceId": "FinServ__RollupByLookupConfig__cRef41",
"errors": [
{
"statusCode": "FIELD_CUSTOM_VALIDATION_EXCEPTION",
"message": "You've reached the maximum of 50 active configuration items.",
"fields": [
]
}
]
},
{
"referenceId": "FinServ__RollupByLookupConfig__cRef44",
"errors": [
{
"statusCode": "FIELD_CUSTOM_VALIDATION_EXCEPTION",
"message": "You've reached the maximum of 50 active configuration items.",
"fields": [
]
}
]
},
{
"referenceId": "FinServ__RollupByLookupConfig__cRef47",
"errors": [
{
"statusCode": "FIELD_CUSTOM_VALIDATION_EXCEPTION",
"message": "You've reached the maximum of 50 active configuration items.",
"fields": [
]
}
]
},
{
"referenceId": "FinServ__RollupByLookupConfig__cRef48",
"errors": [
{
"statusCode": "FIELD_CUSTOM_VALIDATION_EXCEPTION",
"message": "You've reached the maximum of 50 active configuration items.",
"fields": [
]
}
]
}
]
}
I would like to find a way to identify encapsulated JSON and pull it out for better display to the user.
When the Salesforce CLI command
force:data:tree:import
fails, detailed failure information appears as a string representation of JSON data inside of the CLI's JSON response.This output looks like this when the error details are shown to the user after the
falcon:adk:install
command fails:If this data was parsed as an additional JSON object, it could be displayed to the user as something like this:
I would like to find a way to identify encapsulated JSON and pull it out for better display to the user.