MCPcopy Create free account
hub / github.com/nodejs/node / getReplyErrorMessage

Method getReplyErrorMessage

deps/undici/undici.js:10862–10883  ·  view source on GitHub ↗

* Get human-readable error message for reply code

(reply)

Source from the content-addressed store, hash-verified

10860 * Get human-readable error message for reply code
10861 */
10862 getReplyErrorMessage(reply) {
10863 switch (reply) {
10864 case REPLY_CODES.GENERAL_FAILURE:
10865 return "General SOCKS server failure";
10866 case REPLY_CODES.CONNECTION_NOT_ALLOWED:
10867 return "Connection not allowed by ruleset";
10868 case REPLY_CODES.NETWORK_UNREACHABLE:
10869 return "Network unreachable";
10870 case REPLY_CODES.HOST_UNREACHABLE:
10871 return "Host unreachable";
10872 case REPLY_CODES.CONNECTION_REFUSED:
10873 return "Connection refused";
10874 case REPLY_CODES.TTL_EXPIRED:
10875 return "TTL expired";
10876 case REPLY_CODES.COMMAND_NOT_SUPPORTED:
10877 return "Command not supported";
10878 case REPLY_CODES.ADDRESS_TYPE_NOT_SUPPORTED:
10879 return "Address type not supported";
10880 default:
10881 return `Unknown error code: ${reply}`;
10882 }
10883 }
10884 };
10885 module2.exports = {
10886 Socks5Client,

Callers 1

handleConnectResponseMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected