Skip to content

Add error handling for DNS resolution in getK8sRemoteURLArrayFunc#1712

Merged
nmaguiar merged 3 commits intot8from
copilot/sub-pr-1708-another-one
Feb 23, 2026
Merged

Add error handling for DNS resolution in getK8sRemoteURLArrayFunc#1712
nmaguiar merged 3 commits intot8from
copilot/sub-pr-1708-another-one

Conversation

Copy link
Contributor

Copilot AI commented Feb 23, 2026

ow.net.getDNS in getK8sRemoteURLArrayFunc had no error handling, causing the peer function to throw on DNS lookup failures or network issues instead of degrading gracefully.

Changes

  • js/owrap.ch.js: Wrap ow.net.getDNS call in a try-catch; on failure, log the error via logErr (including the DNS name for context) and return []
try {
    var dnsRes = ow.net.getDNS(aOptions.dnsName, aOptions.recordType, aOptions.dnsServer, true);
    dnsArr = isArray(dnsRes) ? dnsRes : [ dnsRes ];
} catch(e) {
    logErr("getK8sRemoteURLArrayFunc DNS resolution failed for '" + aOptions.dnsName + "': " + e);
    return [];
}

Consistent with the existing try-catch already used for ow.net.getHostAddress() in the same function.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…RLArrayFunc

Co-authored-by: nmaguiar <11761746+nmaguiar@users.noreply.github.com>
Copilot AI changed the title [WIP] WIP address feedback on pull request #1708 for T8 changes Add error handling for DNS resolution in getK8sRemoteURLArrayFunc Feb 23, 2026
Copilot AI requested a review from nmaguiar February 23, 2026 14:06
@nmaguiar nmaguiar marked this pull request as ready for review February 23, 2026 14:13
@nmaguiar nmaguiar merged commit 72c05b7 into t8 Feb 23, 2026
1 check passed
@nmaguiar nmaguiar deleted the copilot/sub-pr-1708-another-one branch February 23, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants