Improving error handling in netty