[squash] use the same method to convert the error as we use, successfully, when logging it