Skip to content

Added handling for cloudflare ssl errors (http error 525)#115

Open
Cyberpro54321 wants to merge 2 commits into
wendytg:masterfrom
Cyberpro54321:PR2
Open

Added handling for cloudflare ssl errors (http error 525)#115
Cyberpro54321 wants to merge 2 commits into
wendytg:masterfrom
Cyberpro54321:PR2

Conversation

@Cyberpro54321

Copy link
Copy Markdown

works.get() will now detect a status code of 525 (signifying that there was an SSL error between Cloudflare's reverse-proxy and AO3's servers) and raise an HTTPError, instead of the previous behavior where an AttributeError would be raised when the rest of works.py tried to parse the cloudflare error page as though it were a normal work page.
Also added the HTTP error number to the text of both this exception and the existing rate-limiting exception, so that the type of error can be easily found using ordinary string parsing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant