Today, we are excited to announce the improvements in error responses that you receive for skill development related operations in the CLI and SMAPI; error responses for failed operations of create skill, build model, deploy skill, update skill, publish skill etc. Error responses are now more standard in metadata, more detailed, and more actionable, saving you time in debugging.
Error Responses Are Now Standardized and Actionable
Earlier, error messages contained disparate metadata which led to inconsistency across various failed operations that you performed. Error responses are now standardized around three mandatory keys - code, message, and validationDetails. The validationDetails is further broken down into more keys such as originalInstance, allowedDataTypes, and more. With these changes errors are more structured, consistent and understandable. Below is a before and after an error code related to an invalid data type in skill manifest's publishing information:
"message": "Invalid data type in skill manifest."
"message": "Instance at property path\ "$.manifest.publishingInformation.distributionCountries\" of type \"string\" does not match any allowed primitive types [\"array\"].",
The new error code structure is live on the CLI and SMAPI today. In order to further understand the new error code structure, read up about it in our docs.