system error code
A short name, such as ENOENT or EMFILE, that the operating system uses to say why a request failed.
In more detail
Code can react to specific cases, for example treating ENOENT (file not found) differently from EACCES (permission denied). Each code also has a number, and the error message is a short human-readable version of it.
Example
Node.js puts it on error.code, so a failed open has err.code === "ENOENT".Related terms
- EMFILE — The error code meaning a process has hit its limit on open file descriptors, printed as "too many open files".
- system call — A request a program makes to the kernel, such as open this file or start a new process.
Taught in
- Asynchronous File I/O: node:fs/promises & Handles — Node.js Internals & Backend Services