The reason why I have SocketError is that I need better granularity for machine readable errors. For example, NetworkError is to wide. There is difference between "no network contact" and "TCP peer does not respond".

But there might be a way to extend ECMSScript error or DOMException?