MCPcopy Create free account
hub / github.com/Borodutch/VideoDownloadBot / augmentError

Function augmentError

src/helpers/augmentError.ts:1–8  ·  view source on GitHub ↗
(error: unknown, augmentation: string)

Source from the content-addressed store, hash-verified

1export default function augmentError(error: unknown, augmentation: string) {
2 if (error instanceof Error) {
3 error.message = `${error.message}, ${augmentation}`
4 } else {
5 error = `${error}, ${augmentation}`
6 }
7 return error
8}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected