Use error code as exception message when creating a new transaction