REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.06 KB
Close
/opt/alt/alt-nodejs24/root/usr/lib/node_modules/npm/node_modules.bundled/@npmcli/redact/lib/error.js
Text
Base64
/** takes an error object and serializes it to a plan object */ function serializeError (input) { if (!(input instanceof Error)) { if (typeof input === 'string') { const error = new Error(`attempted to serialize a non-error, string String, "${input}"`) return serializeError(error) } const error = new Error(`attempted to serialize a non-error, ${typeof input} ${input?.constructor?.name}`) return serializeError(error) } // different error objects store status code differently // AxiosError uses `status`, other services use `statusCode` const statusCode = input.statusCode ?? input.status // CAUTION: what we serialize here gets add to the size of logs return { errorType: input.errorType ?? input.constructor.name, ...(input.message ? { message: input.message } : {}), ...(input.stack ? { stack: input.stack } : {}), // think of this as error code ...(input.code ? { code: input.code } : {}), // think of this as http status code ...(statusCode ? { statusCode } : {}), } } module.exports = { serializeError, }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 6
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
deep-map.js
2.21 KB
lrw-r--r--
2026-02-23 07:38:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
error.js
1.06 KB
lrw-r--r--
2026-02-23 07:38:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.js
1.07 KB
lrw-r--r--
2026-02-23 07:38:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
matchers.js
1.96 KB
lrw-r--r--
2026-02-23 07:38:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
server.js
1.34 KB
lrw-r--r--
2026-02-23 07:38:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
utils.js
5.61 KB
lrw-r--r--
2026-02-23 07:38:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).