$ ./guess_the_languageProblem Solving — fix the bug
Problem Solving — fix the bug · hard · #172

Which fix removes the bug?

try {
  await work();
} catch (e) {
  retry();
} finally {
  return 'done';
}
  1. Return outside finally
  2. Rethrow inside catch
  3. Await the retry call
  4. Drop the catch block
A return in finally overrides any pending return or thrown error, swallowing failures.
Play Problem Solving ▸