Skip to content

Commit

Permalink
dnsop/resolver: m warn log
Browse files Browse the repository at this point in the history
  • Loading branch information
ignoramous committed Sep 24, 2024
1 parent 472bc8c commit 99898d5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/plugins/dns-op/resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ export default class DNSResolver {
}

// developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled#return_value
/** @type{Response} */
const res = promisedTasks[1].value;

if (fromMax) {
Expand All @@ -251,8 +252,8 @@ export default class DNSResolver {

if (!res.ok) {
const txt = res.text && (await res.text());
this.log.d(rxid, "!OK", res.status, txt);
throw new Error(txt + " http err: " + res);
this.log.w(rxid, "!OK", res.status, txt);
throw new Error(txt + " http err: " + res.status + " " + res.statusText);
}

const ans = await res.arrayBuffer();
Expand Down

0 comments on commit 99898d5

Please sign in to comment.