proxy: update string formatting and error catching syntax