Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle multiple DNS resolution failure #78

Open
Nebulis opened this issue Jan 2, 2020 · 2 comments
Open

Handle multiple DNS resolution failure #78

Nebulis opened this issue Jan 2, 2020 · 2 comments

Comments

@Nebulis
Copy link
Contributor

Nebulis commented Jan 2, 2020

what happens if more than 1 issuer fails?

Originally posted by @rjchow in #77

@Nebulis
Copy link
Contributor Author

Nebulis commented Jan 2, 2020

const reject = (ms: number) => {
  return new Promise((resolve, reject1) => {
    setTimeout(() => {
      reject1(ms);
    }, ms);
  });
};

const run = async () => {
  try {
    await Promise.all([reject(1000), reject(2000)]);
  } catch (e) {
    console.error(e);
  }
};

run();
npx ts-node ./run
npx: installed 8 in 1.005s
1000

@Nebulis
Copy link
Contributor Author

Nebulis commented Jan 2, 2020

I think it might be interesting to keep this open so that instead of returning an errored fragment directly, we still return the result of every issuer and

  • if there are at least one ERROR amongst issuer, we return an errored fragment
  • otherwise if there are at least one INVALID amongst issuer, we return an anvalid fragment
  • otherwise it's a valid fragment

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

No branches or pull requests

1 participant