79422138

Date: 2025-02-07 20:53:12
Score: 1
Natty:
Report link

I think that when you're in an async function, returning a Promise.reject() ensures that the error isn't caught by a catch block within the same function, which could happen if you’re using multiple try/catch blocks. By early returning a promise reject you are sure that the error can be handled only by the calling function (or higher).

Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: VariabileAleatoria