MCPcopy Create free account
hub / github.com/Effect-TS/effect / withCode

Function withCode

packages/platform/deno/test/internal/error.test.ts:5–5  ·  view source on GitHub ↗
(error: Error, code: string)

Source from the content-addressed store, hash-verified

3import { handleError } from "../../src/internal/error.ts"
4
5const withCode = (error: Error, code: string): Error & { readonly code: string } => Object.assign(error, { code })
6
7describe("handleError", () => {
8 const mapError = handleError("FileSystem", "test", "/tmp/test")

Callers 1

error.test.tsFile · 0.85

Calls 1

assignMethod · 0.80

Tested by

no test coverage detected