move all the error handling in the error type

Created by  irevoire  on December 29, 2020
HSHQP542PXUJQVPUFX2YOSI6N4DYZ75VTBOIVJMYJXFSTKKIBDMAC
Change contents