update dynamic_proxy.js

Error handling