Repository navigation
fix: export the error classes from sanka_sdk and show whoami fields - #38
Open
sanka-change-bot[bot] wants to merge 1 commit into
Open
sanka-change-bot[bot] wants to merge 1 commit into
sanka-change-bot[bot] wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Gauge coding-agent evals (2026-11-20 07:30Z rerun, Qwen run cmwonov5l003a01j07jpd9n51) had to search the package to find UnauthorizedError and ApiError, because sanka_sdk exported neither (exclude_types_from_init_exports also hides errors) and sanka_sdk.errors/init.py is empty. Fern's additional_init_exports (fern/generators.yml and the config in scripts/generate_sdk.sh) now adds ApiError, BadRequestError, ForbiddenError, UnauthorizedError, UnprocessableEntityError and ErrorEnvelope to the root package; regenerated with fern-python-sdk 4.34.0, only src/sanka_sdk/init.py changed (lazy imports like the rest). The README example catches sanka_sdk.UnauthorizedError and prints identity.data.workspace_name and identity.data.permission_level, which agents had to dig out of nested generated types; the example was run against mocked 200 and 401 responses. The new test fails on main (AttributeError: no UnauthorizedError) and passes here. If a regeneration ever drops one of these error modules, the import fails loudly at first use; update the list then. Lines: 32 test, 84 non-test (38 config, 8 script, 18 generated init, 20 README).
Test Intent
Audit
@haegwanSanka Change Botd0355f029706d118f2d1d342a5064fb4f137317alownonePyPI sanka-sdk (published separately by tag)Validation
env PATH=/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin uv run --frozen -- python -W error -m unittest discover -s tests-> passedChange Safety
Approval And Deployment Authorization