grab the error from encoding if there is one