Eason
Eason
related: https://github.com/chimurai/http-proxy-middleware/issues/733
https://github.com/chimurai/http-proxy-middleware/blob/3b9730826187c708fbd16cb0baa588f6aad73a00/src/http-proxy-middleware.ts#L74 @chimurai node-http-proxy socket will throw error if no error listener for default eventemitter 1. https://github.com/http-party/node-http-proxy/blob/9b96cd725127a024dabebec6c7ea8c807272223d/lib/http-proxy/passes/ws-incoming.js#L121 2. https://github.com/http-party/node-http-proxy/blob/9b96cd725127a024dabebec6c7ea8c807272223d/lib/http-proxy/passes/ws-incoming.js#L153 3. https://github.com/http-party/node-http-proxy/blob/9b96cd725127a024dabebec6c7ea8c807272223d/lib/http-proxy/index.js#L38
how to: just ```js this.proxy.ws(req, socket, head, activeProxyOptions, this.logError); ```
found latest source code, should change `this.logError`
> Hi. Thanks for reporting. > > Could you try with `http-proxy-middleware@beta`? (v3.0.0-beta.0) > > V3 registered some additional error handlers to catch the uncaught errors. (https://github.com/chimurai/http-proxy-middleware/blob/master/src/plugins/default/debug-proxy-errors-plugin.ts) > > Hopefully...
大学折腾了两年 Openwrt,写了一堆脚本=_= 国内比较好的Openwrt资源: [Openwrt.io](http://openwrt.io/docs/supported-devices/) http://openwrt.io/docs/flashing/ Openwrt版本shadowsocks资源(记得15.05后某些路由版本可以opkg直接安装): [Package](https://github.com/shadowsocks/openwrt-shadowsocks) [web界面](https://github.com/shadowsocks/luci-app-shadowsocks)
> @andychase, That's what I thought too so I made one https://www.youtube.com/watch?v=3K9iYbJ-1lQ Could you share the example code ?
I get the solution, but it is implicit. ``` async getClient(clientId: string, clientSecret: string | null) { if (clientSecret !== null) { // token flow return models.getClientById(clientId, clientSecret) } else...
> But, sometimes I want give the client more specific error message, like `client secret wrong`. > It seems that oauth2-server has no way to do this. @whlsxl https://github.com/oauthjs/node-oauth2-server/blob/91d2cbe70a0eddc53d72def96864e2de0fd41703/lib/handlers/authorize-handler.js#L182 like...