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

Function handleInteractionError

src/utils/errorHandler.js:315–324  ·  view source on GitHub ↗
(interaction, error, context = {})

Source from the content-addressed store, hash-verified

313}
314
315export async function handleInteractionError(interaction, error, context = {}) {
316 const errorType = categorizeError(error);
317 const userMessage = getUserMessage(error, context);
318 const { logData, traceId } = buildErrorLogData(interaction, error, errorType, context);
319
320 logInteractionError(error, errorType, logData);
321
322 const embed = buildUserErrorEmbed(errorType, userMessage);
323 await sendErrorResponse(interaction, embed, { ...context, traceId });
324}
325
326export function withErrorHandling(fn, context = {}) {
327 return async (...args) => {

Callers 15

safeExecuteMethod · 0.90
executeFunction · 0.90
executeFunction · 0.90
executeFunction · 0.90
handleApplicationModalFunction · 0.90
executeFunction · 0.90
executeFunction · 0.90
executeFunction · 0.90
executeFunction · 0.90
executeFunction · 0.90
executeFunction · 0.90
executeFunction · 0.90

Calls 6

buildUserErrorEmbedFunction · 0.90
categorizeErrorFunction · 0.85
getUserMessageFunction · 0.85
buildErrorLogDataFunction · 0.85
logInteractionErrorFunction · 0.85
sendErrorResponseFunction · 0.85

Tested by

no test coverage detected