Improve error message for invalid thread ID

Include the actual invalid value in error message for better debugging

Co-authored-by: zhaopengme <1415418+zhaopengme@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-02-15 09:13:06 +00:00
parent fb2179d1b5
commit e088cbafa6

View file

@ -433,7 +433,7 @@ func parseTelegramChatID(chatIDStr string) (chatID int64, threadID int, err erro
var tid int
_, err = fmt.Sscanf(parts[1], "%d", &tid)
if err != nil {
return chatID, 0, fmt.Errorf("invalid thread ID: %w", err)
return chatID, 0, fmt.Errorf("invalid thread ID '%s': %w", parts[1], err)
}
threadID = tid
}