Execution: Stringify response error on axios error

I'm sick of not understanding the 400 problem
This commit is contained in:
Wroclaw 2023-09-26 18:17:12 +02:00
parent 6272c7f551
commit 03a1c62cd5

View file

@ -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}):`);
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);