wrap the js configuration in try-catch