Node util.getSystemErrorName function | API Reference | Bun
BuildDocsReferenceGuidesBlogDiscord/
node:util/
getSystemErrorNameFgetSystemErrorName
Search the reference...
/
BuildDocsReferenceGuidesBlogDiscord/
node:util/
getSystemErrorNameFgetSystemErrorName
function
util.getSystemErrorName {
const name = util.getSystemErrorName(err.errno);
console.error(name); // ENOENT
});
```" data-algolia-static="false" data-algolia-merged="false" data-type="Function">function
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.
fs.access('file/that/does/not/exist', (err) => {
const name = util.getSystemErrorName(err.errno);
console.error(name); // ENOENT
});
Resources
ReferenceDocsGuidesDiscordMerch StoreGitHubBlog Toolkit
RuntimePackage managerTest runnerBundlerPackage runnerProject
Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco
We're hiring →