raise error on token parsing failure