Skip to content

Commit 75ee777

Browse files
Fix conversation ID extraction from API response
- Change from conversationData.conversation_id to conversationData.id - Add validation to ensure conversation ID exists before proceeding - This fixes the 'undefined' conversation ID issue in message posting Co-authored-by: openhands <openhands@all-hands.dev>
1 parent 341df49 commit 75ee777

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

example/src/utils/serverStatus.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,14 @@ export const testLLMConfiguration = async (settings: Settings): Promise<{ succes
109109
}
110110

111111
const conversationData = await createResponse.json();
112-
const conversationId = conversationData.conversation_id;
112+
const conversationId = conversationData.id;
113+
114+
if (!conversationId) {
115+
return {
116+
success: false,
117+
error: `Failed to get conversation ID from response: ${JSON.stringify(conversationData)}`
118+
};
119+
}
113120

114121
try {
115122
// Send a simple test message

0 commit comments

Comments
 (0)