christianwdev Posted December 14, 2022 Report Share Posted December 14, 2022 (edited) Hey, I am trying to use a proxy and use different ones for different tasks, which I originally had working, but today I encountered an error with it throwing an "tunneling socket could not be established, statusCode=407", only issue is I don't know exactly where to catch this error as I tried to get it on the onPreHttpRequest, but even with that the entire nodejs process crashed, and I can't really have that occur in production. Proxy was showing as "http://user:pass@ip:port" this.community.onPreHttpRequest = (id, source, options, contReq) => { try { if (options.uri.includes('/inventory/') && options.uri.includes('/252490/2')) { options.proxy = this.invProxies.getProxy() } else if (source === 'steamcommunity') { options.proxy = this.communityProxy } else if (source === 'tradeoffermanager') { options.proxy = this.managerProxy } contReq() return true } catch (e) { console.log(e) } } Thanks in advance. Edited December 14, 2022 by christianwdev Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted December 17, 2022 Report Share Posted December 17, 2022 407 means that your proxy credentials are wrong. https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/407 Quote Link to comment Share on other sites More sharing options...
christianwdev Posted December 17, 2022 Author Report Share Posted December 17, 2022 (edited) 10 hours ago, Dr. McKay said: 407 means that your proxy credentials are wrong. https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/407 Hey, I figured it was something with my proxy not working, but my concern at this point is less about the proxy working, and more about trying to catch the error to prevent the entire backend from crashing as it seems my proxy service decides to randomly invalidate my credentials. Just wasn't sure where I can try catch this or if it's even something that I can do. Thanks again. Edited December 17, 2022 by christianwdev Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.