MCPcopy Index your code
hub / github.com/codebymitch/TitanBot / constructor

Method constructor

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

Source from the content-addressed store, hash-verified

27
28export class TitanBotError extends Error {
29 constructor(message, type = ErrorTypes.UNKNOWN, userMessage = null, context = {}) {
30 super(message);
31 this.name = 'TitanBotError';
32 this.type = type;
33 this.userMessage = userMessage;
34 this.context = context;
35 this.code = context?.errorCode || getDefaultErrorCodeByType(type);
36 this.timestamp = new Date().toISOString();
37 }
38}
39
40export function categorizeError(error) {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected