For example var r = await fetch(url);Is reeponse returned? r receives response; right
var r = await fetch(url);
Return resolved value. In your example, it is a correct response (2xx).
try { var r = await fetch(url); } catch(e) { console.error(e); }
catch Capture the reject value, which is an exception.
catch
expression is a Promise, resolved, returns the resolved value; rejected, throws an exception. Not a Promise, returns a resolved Promise.
await-mdn
Return resolved value. In your example, it is a correct response (2xx).
catch
Capture the reject value, which is an exception.expression is a Promise, resolved, returns the resolved value; rejected, throws an exception.
Not a Promise, returns a resolved Promise.
await-mdn