Migrate from callbacks to async/await
Modernize callback-heavy code to async/await without losing error handling or introducing subtle regressions. Flags any places where behaviour subtly changes.
Preview
Copy prompt
Convert the following callback-based [Language] code to modern async/await: [Paste code]. Preserve all existing error handling logic exactly, ensure promise rejections are properly caught and not silently swallowed, remove all unnecessary callback nesting, and add a short inline comment at any point where the control flow or error behaviour has subtly changed from the original.
More
Refactoring
Prompts
