comparison roundup/cgi/client.py @ 8408:e882a5d52ae5

refactor: move RateLimitExceeded to roundup.cgi.exceptions RateLimitExceeded is an HTTP exception that raises code 429. Move it to roundup.cgi.exceptions where all the other exceptions that result in http status codes are located. Also make it inherit from HTTPException since it is one. Also add docstrings for all HTTP exceptions and order HTTPExceptions by status code. BREAKING CHANGE: if somebody is importing RateLimitExceeded they will need to change their import. I consider it unlikely anybody is using RateLimitExceeded. Detectors and extensions are unlikely to raise RateLimitExceeded. So I am leaving it out of the upgrading doc. Just doc in change log.
author John Rouillard <rouilj@ieee.org>
date Sun, 10 Aug 2025 21:27:06 -0400
parents 4e2ffa4151cb
children ef1ea918b07a
comparison
equal deleted inserted replaced
8407:700424ba015c 8408:e882a5d52ae5
38 DetectorError, 38 DetectorError,
39 FormError, 39 FormError,
40 IndexerQueryError, 40 IndexerQueryError,
41 NotFound, 41 NotFound,
42 NotModified, 42 NotModified,
43 RateLimitExceeded,
43 Redirect, 44 Redirect,
44 SendFile, 45 SendFile,
45 SendStaticFile, 46 SendStaticFile,
46 SeriousError, 47 SeriousError,
47 ) 48 )
48 from roundup.cgi.form_parser import FormParser 49 from roundup.cgi.form_parser import FormParser
49 from roundup.exceptions import ( 50 from roundup.exceptions import (
50 LoginError, 51 LoginError,
51 RateLimitExceeded,
52 Reject, 52 Reject,
53 RejectRaw, 53 RejectRaw,
54 Unauthorised, 54 Unauthorised,
55 UsageError, 55 UsageError,
56 ) 56 )

Roundup Issue Tracker: http://roundup-tracker.org/