Closed TimeBather closed 1 year ago
duplicate of #1008?
No , #1008 is a bug with image sending problem, not the authentication problem.
I am sure that it has enough permission for my bot because I use the same command to test it after I restarting the bot and waiting for half day. But it can send messages in the first condition but throw a 400 error in the last one.
https://github.com/satorijs/satori/blob/c073802609a60579e43bb8d06a73fae0ee1b7e5c/adapters/feishu/src/bot.ts#LL43C4-L43C4
I searched the references of refershToken()
method in the satori project , and this method was only called by the initialize
method. And another thing I found that the refreshToken method did not read the expiration of the token . Is it the cause of this problem?
You're right. This is a point that could be optimised.
Axios allows you to add a pre request
hook, so I think the token refreshing could be put here.
Resolved in https://github.com/satorijs/satori/pull/81
Describe the bug
When the bot was sending the message to the server, the koishi throw an error:
It appear after my bot started for about half day. It seems that this error is caused by the token expiration.
Steps to reproduce
Expected behavior
Screenshots
No feishu api server log detected. Here is the feishu requester log:
Versions
Additional context
None