fix: improve error handling

This commit is contained in:
Barrett Ruth 2025-10-05 16:06:08 -04:00
parent 9134a0742b
commit a0b5264761
6 changed files with 33 additions and 26 deletions

View file

@ -4,13 +4,13 @@ local M = {}
local function contest_picker(platform, refresh)
local constants = require('cp.constants')
local platform_display_name = constants.PLATFORM_DISPLAY_NAMES[platform] or platform
local platform_display_name = constants.PLATFORM_DISPLAY_NAMES[platform]
local fzf = require('fzf-lua')
local contests = picker_utils.get_platform_contests(platform, refresh)
if vim.tbl_isempty(contests) then
vim.notify(
('No contests found for platform: %s'):format(platform_display_name),
("No contests found for platform '%s'"):format(platform_display_name),
vim.log.levels.WARN
)
return