Repository navigation
fix: handle omitted list claims and shipments options - #303
Merged
Justin Hammond (Justintime50) merged 6 commits intoNov 25, 2026
Merged
Justin Hammond (Justintime50) merged 6 commits into
Justin Hammond (Justintime50) merged 6 commits into
Conversation
Alex Castillo González (pcbeingused33)
requested review from
a team
as code owners
November 25, 2026 03:49
Justin Hammond (Justintime50)
approved these changes
Nov 25, 2026
Justin Hammond (Justintime50)
merged commit Nov 25, 2026
aa5d80e
into
EasyPost:master
10 checks passed
Member
|
Thanks for the PR and find! There were 2 other related spots that I made changes for. I removed the test because our test suites for libs only do e2e API calls - your test verified the change is valid. This is released in v6.0.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.
Description
ListClaims(nil)andListShipments(nil)panic after decoding a successful response because the client dereferences the omitted options when saving query parameters for pagination.UpdateWebhook(id, nil)panics the same way before sending the request.Copy the list options only when they were supplied, matching the guard
ListTrackersWithContextalready has (#301). Unfiltered calls return the decoded results with zero-value parameters, and filtered calls still save their parameters for the next page.UpdateWebhooknow sends an empty update when no options are given, which re-enables the webhook as its doc comment describes. No other function in the library dereferences optional list options;ListTrackerswas already guarded, and the remaining list calls pass options straight through to the request.Also preps v6.0.1 (
CHANGELOG.mdandversion.go).Testing
Calling
ListClaims(nil),ListShipments(nil)andUpdateWebhook(id, nil)against a mocked HTTP 200 panicked on master and returns the decoded results with the guard. The full test suite passes.Pull Request Type
This change was prepared with assistance from an AI tool.