Jormungandr: fix error for wrongly formated tokens

wrongly formated token were resulting with internal error, now we get a nicer error
it doesn't throw error