MCPcopy Create free account
hub / github.com/BridgeAR/safe-stable-stringify / safeErrorMessage

Function safeErrorMessage

index.js:228–234  ·  view source on GitHub ↗
(error)

Source from the content-addressed store, hash-verified

226}
227
228function safeErrorMessage (error) {
229 try {
230 return String(error)
231 } catch {
232 return 'Failed'
233 }
234}
235
236function getErrorMessage (error, name) {
237 const message = typeof error?.message === 'string'

Callers 2

getStrictOptionFunction · 0.85
getErrorMessageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected