@makingchatbots/genesys-cloud-mcp-server
Version:
A Model Context Protocol (MCP) server exposing Genesys Cloud tools for LLMs, including sentiment analysis, conversation search, topic detection and more.
17 lines (16 loc) • 622 B
JavaScript
export function isConversationNotFoundError(obj) {
if (typeof obj === "object" && obj !== null) {
const maybe = obj;
const resourceNotFoundError = typeof maybe.code === "string" && maybe.code === "resource.not.found";
const subjectConversationId = typeof maybe.messageParams?.id === "string"
? maybe.messageParams.id
: undefined;
if (resourceNotFoundError) {
return {
isResourceNotFoundError: true,
conversationId: subjectConversationId,
};
}
}
return { isResourceNotFoundError: false };
}