Skip to main content
getSystemErrorName - node__util.d.ts - Node documentation
function getSystemErrorName

Usage in Deno

```typescript import { getSystemErrorName } from "node:node__util.d.ts"; ```
getSystemErrorName(err: number): string
Returns the string name for a numeric error code that comes from a Node.js API. The mapping between error codes and error names is platform-dependent. See `Common System Errors` for the names of common errors. ```js fs.access('file/that/does/not/exist', (err) => { const name = util.getSystemErrorName(err.errno); console.error(name); // ENOENT }); ```

Parameters

err: number

Return Type

string