Skip to content

Commit 8bae8ff

Browse files
committed
show error message
1 parent 610f72f commit 8bae8ff

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

apps/remix-ide/src/app/plugins/openaigpt.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ export class OpenAIGpt extends Plugin {
3939

4040
if (result && result.choices && result.choices.length) {
4141
this.call('terminal', 'log', { type: 'typewritersuccess', value: result.choices[0].message.content })
42+
} else if (result.error) {
43+
this.call('terminal', 'log', { type: 'typewritersuccess', value: result.error })
4244
} else {
4345
this.call('terminal', 'log', { type: 'typewritersuccess', value: 'No response...' })
4446
}

0 commit comments

Comments
 (0)