Make error messages more descriptive

This commit is contained in:
Maksym Pavlenko
2017-03-06 12:56:16 -08:00
parent 7452b8db75
commit 6eafdc8f49
3 changed files with 24 additions and 7 deletions
@@ -1,4 +1,5 @@
using System;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Podsync.Helpers;
@@ -45,8 +46,8 @@ namespace Podsync.Controllers
}
catch (Exception ex)
{
var response = "Could nou resolve URL";
if (ex is InvalidOperationException)
var response = "Could not resolve URL";
if (ex is InvalidOperationException || ex is HttpRequestException)
{
response = ex.Message;
}