- Set User-Agent on OAuth1Session during token fetch and access token
exchange so Wikimedia doesn't reject the requests with 403
- Extract handle_post() from article_page() for clarity
- Catch api.MediawikiError in get_best_hit() to skip bad API responses
rather than crashing the page
- Catch mediawiki_api.APIError on save and return a 502 with the error
text instead of a 500 traceback
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>