Skip to content

Conversation

@otukado
Copy link

@otukado otukado commented Sep 17, 2025

close: #2813

@otukado otukado requested a review from a team as a code owner September 17, 2025 06:59
@otukado otukado requested a review from Takeno-hito September 17, 2025 06:59
@otukado otukado force-pushed the fix/suppress-access-token-not-found-error branch from 0540448 to 0d1a44f Compare September 17, 2025 08:00
@otukado otukado changed the title fix: Bot の Access Token が存在しないときの InternalServerError を抑制する fix: Bot の Access Token が revoke されても bot の detail を見れるようにする Sep 17, 2025
@otukado otukado force-pushed the fix/suppress-access-token-not-found-error branch from 6ecd6bc to 351126b Compare September 17, 2025 08:59
@otukado otukado self-assigned this Sep 19, 2025

_, err = env.Repository.GetTokenByID(token.ID)
assert.EqualError(t, err, repository.ErrNotFound.Error())
d, err := env.Repository.GetTokenByIDWithDeleted(token.ID)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GetTokenByID では error が変わらず返ってくることは試してほしいかも(細かい話をいうと本当はここの責務ではない気もするんだけど)

}

t, err := h.Repo.GetTokenByID(b.AccessTokenID)
t, err := h.Repo.GetTokenByIDWithDeleted(b.AccessTokenID)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bots_test.go に Token が Deleted 状態だったらしっかりレスポンスも Revoked true になってるかをチェックするコードを入れてほしい!

@otukado otukado requested a review from Takeno-hito December 25, 2025 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bot の Access Token が revoke されても bot の detail を見れるようにする

4 participants