fix(client): error handling, tz-aware dates, date validation (0.1.1) - #9
Merged
Merged
Conversation
…ror on bad dates - CurrentsAPIError: message falls back to API 'msg' key; str(e) returns the human-readable message; status coerces numeric strings to int - search(): tz-aware datetimes converted to UTC before strftime - _parse_date: unparsable date strings raise ValueError, not ParserError - 4 new regression tests; version 0.1.1
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.
Live-API bug probing of the published 0.1.0 found three client bugs. All fixed with regression tests (44 pass).
Fixes
msg, notmessage, so.message/.codewere dead andstr(e)was a raw dict repr. Now: message falls back tomsg,str(e)is human-readable,.statuscoerces numeric strings to int (e.status == 401works).search(start_date=datetime(2026,9,1,tzinfo=+08:00))was sent as...T00:00:00Z(8h off, silent). Now converted to UTC first.search(start_date="2026-13-45")leakeddateutil.parser.ParserError; now raises documentedValueError.Validation