All hallucination drills
event-loopFree sample

A team saw event-loop stalls while parsing large webhook payloads and asked an assistant to make the parse non-blocking. The assistant produced this wrapper and claimed that because the work now runs inside a promise, parsing happens off the main thread and requests keep flowing while it completes.

js
function parseAsync(json) {
  return new Promise((resolve, reject) => {
    try {
      resolve(JSON.parse(json));
    } catch (err) {
      reject(err);
    }
  });
}
Which one is the flaw?