MCPcopy Create free account
hub / github.com/ehmicky/log-process-errors / getError

Function getError

src/error.js:5–9  ·  view source on GitHub ↗
(value, event)

Source from the content-addressed store, hash-verified

3
4// Normalize error and add the `event` to its `message`
5export const getError = (value, event) => {
6 const error = normalizeException(value)
7 setErrorMessage(error, `${getMessage(error, event)}${MESSAGES[event]}`)
8 return error
9}
10
11const getMessage = ({ message }, event) =>
12 event === 'rejectionHandled'

Callers 1

handleEventFunction · 0.90

Calls 1

getMessageFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…