fix: return more appropriate error on token fetch fail
This commit is contained in:
@@ -284,7 +284,7 @@ impl User {
|
|||||||
db.fetch_user(
|
db.fetch_user(
|
||||||
&db.fetch_bot_by_token(token)
|
&db.fetch_bot_by_token(token)
|
||||||
.await
|
.await
|
||||||
.map_err(|_| create_error!(InternalError))?
|
.map_err(|_| create_error!(InvalidSession))?
|
||||||
.id,
|
.id,
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
|
|||||||
Reference in New Issue
Block a user