diff --git a/Application/FeedCenter.csproj b/Application/FeedCenter.csproj index caa90e0..2da3288 100644 --- a/Application/FeedCenter.csproj +++ b/Application/FeedCenter.csproj @@ -34,7 +34,7 @@ - + @@ -44,7 +44,7 @@ NU1701 - + NU1701 diff --git a/Application/Feeds/Feed.cs b/Application/Feeds/Feed.cs index 572684c..efe5f07 100644 --- a/Application/Feeds/Feed.cs +++ b/Application/Feeds/Feed.cs @@ -356,6 +356,9 @@ public partial class Feed : RealmObject, INotifyDataErrorInfo { switch (httpRequestException.StatusCode) { + case HttpStatusCode.TooManyRequests: + return Tuple.Create(FeedReadResult.TooManyRequests, string.Empty); + case HttpStatusCode.ServiceUnavailable: return Tuple.Create(FeedReadResult.TemporarilyUnavailable, string.Empty); diff --git a/Application/Feeds/FeedReadResult.cs b/Application/Feeds/FeedReadResult.cs index 68f79ae..592a35d 100644 --- a/Application/Feeds/FeedReadResult.cs +++ b/Application/Feeds/FeedReadResult.cs @@ -15,5 +15,6 @@ public enum FeedReadResult ConnectionFailed, ServerError, Moved, - TemporarilyUnavailable + TemporarilyUnavailable, + TooManyRequests } \ No newline at end of file diff --git a/Application/Properties/Resources.Designer.cs b/Application/Properties/Resources.Designer.cs index b694911..41d4719 100644 --- a/Application/Properties/Resources.Designer.cs +++ b/Application/Properties/Resources.Designer.cs @@ -840,6 +840,15 @@ namespace FeedCenter.Properties { } } + /// + /// Looks up a localized string similar to Temporarily unavailable. + /// + public static string FeedReadResult_TemporarilyUnavailable { + get { + return ResourceManager.GetString("FeedReadResult_TemporarilyUnavailable", resourceCulture); + } + } + /// /// Looks up a localized string similar to Timeout. /// @@ -849,6 +858,15 @@ namespace FeedCenter.Properties { } } + /// + /// Looks up a localized string similar to Too many requests. + /// + public static string FeedReadResult_TooManyRequests { + get { + return ResourceManager.GetString("FeedReadResult_TooManyRequests", resourceCulture); + } + } + /// /// Looks up a localized string similar to Not authorized. /// diff --git a/Application/Properties/Resources.resx b/Application/Properties/Resources.resx index 87b5335..b04dc5a 100644 --- a/Application/Properties/Resources.resx +++ b/Application/Properties/Resources.resx @@ -555,4 +555,10 @@ All feeds currently in category "{0}" will be moved to the default category. User agent + + Temporarily unavailable + + + Too many requests + \ No newline at end of file