add exception handler for bad JSON