mattstyles / koa-socket

Sugar for connecting socket.io to a koa instance
242 stars 50 forks source link

Error Handling #23

Open hoodsy opened 7 years ago

hoodsy commented 7 years ago

I'd like to throw errors via ctx.throw like I do in my routes, in my socket functions. How can I pass an instance of ctx, or app into my socket functions to properly handle my errors in a similar way to those in my route functions?