mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-04 03:16:11 +00:00
Add default messages for custom exceptions
Right now, our exception messages come from the API response in most cases. But if for any reason there isn't one, we supply a default. I realized these messages might make it to people's logs so it might be nice to spend time later making them even more useful.
This commit is contained in:
@@ -52,6 +52,13 @@ namespace Octokit
|
||||
/// </summary>
|
||||
public DateTimeOffset Reset { get; private set; }
|
||||
|
||||
// TODO: Might be nice to have this provide a more detailed message such as what the limit is,
|
||||
// how many are remaining, and when it will reset. I'm too lazy to do it now.
|
||||
public override string Message
|
||||
{
|
||||
get { return ApiErrorMessageSafe ?? "API Rate Limit exceeded"; }
|
||||
}
|
||||
|
||||
#if !NETFX_CORE
|
||||
protected RateLimitExceededException(SerializationInfo info, StreamingContext context)
|
||||
: base(info, context)
|
||||
|
||||
Reference in New Issue
Block a user