public async Task <IActionResult> GetSonarrTags([FromBody] TestSonarrSettingsModel model) { try { var tags = await SonarrClient.GetTags(_httpClientFactory.CreateClient(), _logger, ConvertToSonarrSettings(model)); return(Ok(tags.Select(x => new SonarrTag { Id = x.id, Name = x.label }))); } catch (System.Exception) { return(BadRequest($"Could not load the tags from Sonarr, check your settings.")); } }