Rearrange ErrorResult constructor to reflect optionality of error.name field