File tree Expand file tree Collapse file tree 2 files changed +27
-15
lines changed Expand file tree Collapse file tree 2 files changed +27
-15
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,11 @@ private NotionApiException(
2121 NotionAPIErrorCode = notionAPIErrorCode ;
2222 StatusCode = statusCode ;
2323
24+ InitializeData ( ) ;
25+ }
26+
27+ private void InitializeData ( )
28+ {
2429 Data . Add ( "StatusCode" , StatusCode ) ;
2530 Data . Add ( "NotionApiErrorCode" , NotionAPIErrorCode ) ;
2631 }
@@ -29,19 +34,4 @@ private NotionApiException(
2934
3035 public HttpStatusCode StatusCode { get ; }
3136 }
32-
33- public sealed class NotionApiRateLimitException : NotionApiException
34- {
35- public TimeSpan ? RetryAfter { get ; }
36-
37- public NotionApiRateLimitException (
38- HttpStatusCode statusCode ,
39- NotionAPIErrorCode ? notionAPIErrorCode ,
40- string message ,
41- TimeSpan ? retryAfter )
42- : base ( statusCode , notionAPIErrorCode , message )
43- {
44- RetryAfter = retryAfter ;
45- }
46- }
4737}
Original file line number Diff line number Diff line change 1+ using System ;
2+ using System . Net ;
3+
4+ namespace Notion . Client
5+ {
6+ public sealed class NotionApiRateLimitException : NotionApiException
7+ {
8+ public TimeSpan ? RetryAfter { get ; }
9+
10+ public NotionApiRateLimitException (
11+ HttpStatusCode statusCode ,
12+ NotionAPIErrorCode ? notionAPIErrorCode ,
13+ string message ,
14+ TimeSpan ? retryAfter )
15+ : base ( statusCode , notionAPIErrorCode , message )
16+ {
17+ RetryAfter = retryAfter ;
18+
19+ Data . Add ( "RetryAfter" , retryAfter ) ;
20+ }
21+ }
22+ }
You can’t perform that action at this time.
0 commit comments