Skip to content

Commit

Permalink
fix(qq): error log
Browse files Browse the repository at this point in the history
  • Loading branch information
XxLittleCxX committed Nov 20, 2023
1 parent de7005a commit 9e34997
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions adapters/qq/src/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,9 @@ export class QQMessageEncoder<C extends Context = Context> extends MessageEncode
}
}
} catch (e) {
if (!Quester.isAxiosError(e)) throw e
this.errors.push(e)
this.bot.logger.warn(e)
Quester.isAxiosError(e) && this.bot.logger.error('[response] %o', e.response?.data)
this.bot.logger.warn('[response] %s %o', e.response?.status, e.response?.data)
}

// this.results.push(session.event.message)
Expand Down Expand Up @@ -234,8 +234,9 @@ export class QQMessageEncoder<C extends Context = Context> extends MessageEncode
await this.bot.internal.sendFileGuild(this.session.guildId, data)
}
} catch (e) {
Quester.isAxiosError(e) && this.bot.logger.warn(e.response?.data)
if (!Quester.isAxiosError(e)) throw e
this.errors.push(e)
this.bot.logger.warn('[response] %s %o', e.response?.status, e.response?.data)
}
entry?.dispose?.()
}
Expand Down

0 comments on commit 9e34997

Please sign in to comment.