[test] error handling
[fix] fix bugs related to error handling and don't just emit error, if it can be handled by the client