Skip to content

Commit 009d5e6

Browse files
committed
Update error
1 parent 18367df commit 009d5e6

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

dist/index.js

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/inference.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ export async function mcpInference(
111111
const response = await client.chat.completions.create(chatCompletionRequest)
112112

113113
if (!('choices' in response)) {
114-
core.error('Unexpected response format from OpenAI API')
115-
return null
114+
throw new Error(`Unexpected response format from API: ${JSON.stringify(response)}`)
116115
}
117116

118117
const assistantMessage = response.choices[0]?.message

0 commit comments

Comments
 (0)