Jormungandr: fix error for wrongly formated tokens

wrongly formated token were resulting with internal error, now we get a nicer error
you're right, done