In ApiKeyException and RateLimitExceededException we get a RCS1194 warning from Roslynator. We're not implementing the default exception constructors there and Roslynator warns us about that. However, we don't override the exception constructors for good reason so we need to add supression rules for the warning to those exceptions.
In ApiKeyException we really don't want to leak API keys to logging systems or end users or whatever. So we disable using a constructor override with a custom message.
The RateLimitExceededException already gives all the information a user of the library needs. This exception is mainly meant to be handled in application code to pause and then retry when the specified timeout (available in the RetryAfter property) has elapsed., There's no real need to override the exception message here. And more importantly. implementing the default constructors can result in not setting the RetryAfter property leading it to be a TimeSpan of zero while that's incorrect.
In
ApiKeyException
andRateLimitExceededException
we get a RCS1194 warning from Roslynator. We're not implementing the default exception constructors there and Roslynator warns us about that. However, we don't override the exception constructors for good reason so we need to add supression rules for the warning to those exceptions.ApiKeyException
we really don't want to leak API keys to logging systems or end users or whatever. So we disable using a constructor override with a custom message.RateLimitExceededException
already gives all the information a user of the library needs. This exception is mainly meant to be handled in application code to pause and then retry when the specified timeout (available in theRetryAfter
property) has elapsed., There's no real need to override the exception message here. And more importantly. implementing the default constructors can result in not setting theRetryAfter
property leading it to be aTimeSpan
of zero while that's incorrect.