better error message if json lib raises weird exception