File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change
1
+ <?php namespace RestExtension \Exceptions ;
2
+
3
+ class RateLimitExceededException extends RestException {
4
+
5
+ protected $ code = 429 ;
6
+ protected $ message = 'RateLimitExceeded ' ;
7
+
8
+ }
Original file line number Diff line number Diff line change 16
16
use RestExtension \Entities \ApiRoute ;
17
17
use RestExtension \Entities \ApiUsageReport ;
18
18
use RestExtension \Entities \OAuthClient ;
19
+ use RestExtension \Exceptions \RateLimitExceededException ;
19
20
use RestExtension \Exceptions \RestException ;
20
21
use RestExtension \Exceptions \UnauthorizedException ;
21
22
use RestExtension \Models \ApiAccessLogModel ;
@@ -281,7 +282,7 @@ public static function postControllerConstructor() {
281
282
/*
282
283
* Unauthorized!
283
284
*/
284
- throw new UnauthorizedException ('API Rate limit exceeded ' );
285
+ throw new RateLimitExceededException ('API Rate limit exceeded ' );
285
286
}
286
287
287
288
}
You can’t perform that action at this time.
0 commit comments