Execution: Stringify response error on axios error
I'm sick of not understanding the 400 problem
This commit is contained in:
parent
6272c7f551
commit
03a1c62cd5
1 changed files with 6 additions and 1 deletions
|
@ -287,7 +287,12 @@ async function executeFromQueue(channel: string) {
|
|||
} catch (e) {
|
||||
channelQueue.stopTyping();
|
||||
console.error(`Error ocurred while handling chat completion request (${(e as object).constructor.name}):`);
|
||||
console.error(e);
|
||||
if (Axios.isAxiosError(e)) {
|
||||
console.error(JSON.stringify(e.response?.data));
|
||||
}
|
||||
else {
|
||||
console.error(e);
|
||||
}
|
||||
if (OpenAImessages.length !== 0) {
|
||||
console.error("Messages:");
|
||||
console.error(OpenAImessages);
|
||||
|
|
Loading…
Reference in a new issue