Node system errors are Error objects carrying a code such as ENOENT (file not found), EACCES (permission denied), or EEXIST (already exists). You tell them apart with error.code to react to each cause; every rejected promise or event error must be handled to avoid the process crashing.
Example
try { await readFile(p); } catch (e) { if (e.code === 'ENOENT') return null; throw e; }