MCPcopy Index your code
hub / github.com/coder/code-server / errorHasCode

Function errorHasCode

src/node/routes/errors.ts:25–27  ·  view source on GitHub ↗
(error: any)

Source from the content-addressed store, hash-verified

23
24/** Error originates from file system. */
25export const errorHasCode = (error: any): error is ErrorWithCode => {
26 return error && "code" in error
27}
28
29const notFoundCodes = [404, "ENOENT", "EISDIR"]
30

Callers 2

errorHandlerFunction · 0.85
wsErrorHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected