mirror of
https://github.com/Glitchy-Sheep/boosty-downloader.git
synced 2026-10-14 21:33:23 +00:00
[PR #43] [MERGED] Disambiguate "unauthorized" error from "blog_not_found" #73
Labels
No labels
api-drift
bug
ci
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Glitchy-Sheep/boosty-downloader#73
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Glitchy-Sheep/boosty-downloader/pull/43
Author: @KorespondentAda
Created: 7/26/2025
Status: ✅ Merged
Merged: 7/30/2025
Merged by: @Glitchy-Sheep
Base:
dev← Head:main📝 Commits (10+)
3be47a4Disambiguate "unauthorized" error from "blog_not_found"10497c4Disambiguate "unauthorized" error from "blog_not_found"bffbf09refactor: ♻️ Reformat doc comment and remove unused variable3ad99e5refactor: ♻️ Better tests structure: remove unnecessary init files9d0e1e1feat: ➕ Add pytest_asyncio to run some async integration tests384f47ctest: ✅ Add some integration tests for the API, better structure for tests29c6dedfeat: ✨ Update Makefile (add integration tests targets)8e6ac61docs: 📝 Add ABOUT_TESTING.md for better understanding the tests structure/layout9730b7efix: 🐛 Fix listing posts exception (some new post type failed validation process)01508c4fix: 🐛 Fix pytest warning (import issues)📊 Changes
21 files changed (+503 additions, -26 deletions)
View changed files
📝
.github/workflows/any-pr-validation.yaml(+8 -5)📝
Makefile(+33 -13)📝
boosty_downloader/main.py(+6 -0)📝
boosty_downloader/src/boosty_api/core/client.py(+26 -6)📝
boosty_downloader/src/boosty_api/models/post/base_post_data.py(+9 -1)➕
boosty_downloader/src/boosty_api/models/post/post_data_types/post_data_header.py(+12 -0)➕
boosty_downloader/src/boosty_api/models/post/post_data_types/post_data_list.py(+31 -0)📝
boosty_downloader/src/download_manager/download_manager.py(+10 -0)📝
poetry.lock(+34 -1)📝
pyproject.toml(+1 -0)➕
test/ABOUT_TESTING.md(+28 -0)➕
test/integration/.env.example(+18 -0)📝
test/integration/__init__.py(+0 -0)📝
test/integration/analysis/__init__.py(+0 -0)➕
test/integration/analysis/get_author_posts_test.py(+65 -0)📝
test/integration/boosty_api/__init__.py(+0 -0)➕
test/integration/boosty_api/boosty_api_test.py(+100 -0)➕
test/integration/configuration.py(+24 -0)➕
test/integration/fixtures.py(+98 -0)➕
test/unit/__init__.py(+0 -0)...and 1 more files
📄 Description
📌 Task
📝 Description
Currently any error returned from Boosty API treated as "User not found" error with respective error message by checking of presence
datafield in API response.This is misleading if some other error occured, like
unauthorizedthat is returned if config has wrong (or expired) credentials.To disambiguate this kinds of errors from any others, there is different exceptions provided.
🔄 Changelog
BoostyAPIUnauthorizedError,BoostyAPIUnknownErrorand respective error messages for user.unauthorizederror was treated as if it wasblog_not_found.BoostyAPINoUsernameErrornow raised only if gotblog_not_founderror from API.@Glitchy-Sheep UPD:
✅ Checklist
@Glitchy-Sheep UPD: Removed some checklist items because of new CI and release cycle
⚠ Notes
I'm not a python programmer and maybe there is better way, I just tried to follow existing error handling scheme to extend it a bit.
Also there may be other errors from API that better be handled specificly, I far as I see they can be added in the same way.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.