Skip to content

Commit be8f428

Browse files
authored
Merge pull request #4250 from ethereum/yann300-patch-51
show error message
2 parents df1ab29 + 146bd45 commit be8f428

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)