update to use AppError.Where() to differentiate errors (#24379)

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Scott Bishel
2023-09-08 08:17:58 -06:00
коммит произвёл GitHub
родитель 2d1848bf14
Коммит 15faf4a69c
4 изменённых файлов: 13 добавлений и 13 удалений

Просмотреть файл

@@ -135,13 +135,13 @@ func getBot(c *Context, w http.ResponseWriter, r *http.Request) {
// Pretend like the bot doesn't exist at all to avoid revealing that the
// user is a bot. It's kind of silly in this case, sine we created the bot,
// but we don't have read bot permissions.
c.Err = model.MakeBotNotFoundError(botUserId)
c.Err = model.MakeBotNotFoundError("permissions", botUserId)
return
}
} else {
// Pretend like the bot doesn't exist at all, to avoid revealing that the
// user is a bot.
c.Err = model.MakeBotNotFoundError(botUserId)
c.Err = model.MakeBotNotFoundError("permissions", botUserId)
return
}