MCPcopy
hub / github.com/codebymitch/TitanBot / createError

Function createError

src/utils/errorHandler.js:347–354  ·  view source on GitHub ↗
(message, type = ErrorTypes.UNKNOWN, userMessage = null, context = {})

Source from the content-addressed store, hash-verified

345}
346
347export function createError(message, type = ErrorTypes.UNKNOWN, userMessage = null, context = {}) {
348 const normalizedContext = {
349 ...context,
350 errorCode: context?.errorCode || getDefaultErrorCodeByType(type)
351 };
352
353 return new TitanBotError(message, type, userMessage, normalizedContext);
354}
355
356export default {
357 ErrorTypes,

Callers 15

ensureTypedServiceErrorFunction · 0.90
safeExecuteMethod · 0.90
apply.jsFile · 0.90
handleListFunction · 0.90
withdraw.jsFile · 0.90
mine.jsFile · 0.90
deposit.jsFile · 0.90
balance.jsFile · 0.90
work.jsFile · 0.90
crime.jsFile · 0.90

Calls 1

Tested by

no test coverage detected