Maybe better throw a DecodingException or IllegalStateException ?