// If possible, we try to move any subpath errors into the subErrors of an (optionally newly-created) root error. Otherwise, it can become difficult for the user to correlate together the root and subpath errors that are related, when we start changing the messages of the root errors.
?errorsByType.validationRoot.map((error)=>{
if(errorsByType.validationRoot.length===0){
// TODO: Currently we cannot set `originalError` due to a bug in `create-error`; switch to a better error implementation