MCPcopy Create free account
hub / github.com/Azure/sql-action / parseErrorForIpAddress

Method parseErrorForIpAddress

src/SqlUtils.ts:92–99  ·  view source on GitHub ↗

* Parse an error message to see if it contains an IP address. * Returns the IP address if found, otherwise undefined.

(errorMessage: string)

Source from the content-addressed store, hash-verified

90 * Returns the IP address if found, otherwise undefined.
91 */
92 private static parseErrorForIpAddress(errorMessage: string): string | undefined {
93 let ipAddress: string | undefined;
94 const ipAddresses = errorMessage.match(Constants.ipv4MatchPattern);
95 if (!!ipAddresses) {
96 ipAddress = ipAddresses[0];
97 }
98 return ipAddress;
99 }
100
101 /**
102 * Builds the beginning of a sqlcmd command populated with the connection settings.

Callers 1

tryConnectionMethod · 0.95

Calls 1

matchMethod · 0.45

Tested by

no test coverage detected