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 удалений

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

@@ -213,8 +213,8 @@ func (l *BotList) Etag() string {
// MakeBotNotFoundError creates the error returned when a bot does not exist, or when the user isn't allowed to query the bot.
// The errors must the same in both cases to avoid leaking that a user is a bot.
func MakeBotNotFoundError(userId string) *AppError {
return NewAppError("SqlBotStore.Get", "store.sql_bot.get.missing.app_error", map[string]any{"user_id": userId}, "", http.StatusNotFound)
func MakeBotNotFoundError(where, userId string) *AppError {
return NewAppError(where, "store.sql_bot.get.missing.app_error", map[string]any{"user_id": userId}, "", http.StatusNotFound)
}
func IsBotDMChannel(channel *Channel, botUserID string) bool {