Repository navigation
Conversation
- F13: Client.lastError() returns a serpapi.ErrorInfo with the message,
HTTP status, request URL without the api_key, and the search id of the
failed search, mirroring serpapi-ruby's SerpApiError fields
- F13b: Client.format masks the API key the way serpapi-ruby's inspect
does. The key now lives in its own field behind a many-item pointer, so
`{any}` on the client or its params prints an address, not the key
- D3: live tests for searchArchiveAs, searchArchiveHtml, searchArchiveMd,
locationAs, and lastError (401 on a bad key, 404 on an unknown archive)
- D5: rake release runs lint, test, itest and oobt first, behind a
preflight that needs SERPAPI_KEY and an empty `git status --porcelain`
(`git diff --quiet` missed staged and untracked files)
- D6: README documents engine(), apiKey(), serpapi.version, printing the
client, and lastError()
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- errorMessage() and lastError() describe the most recent request only: fetch clears the previous failure first, so a success or a transport error (DNS, connection, TLS) leaves them null instead of reporting an older 404. Offline test: 404, then success, then a refused connection - rake release:preflight also requires HEAD to be master, since release pushes master and the tag - CHANGELOG: the api_key leaving params and the new last_error type are Breaking changes; the per-request lastError is a Behavior change (D7) - recordUrl uses `if (self.last_error) |*info|`; the Client doc comment names lastError() as per-instance state too Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Breaking changes ship in this minor release by maintainer decision. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes the gaps a parity review against serpapi-ruby (the reference implementation) found. Bumps the version to 1.2.0.
Changes
Client.lastError()returns aserpapi.ErrorInfowithmessage, the HTTPstatus, the requesturlwithout theapi_key, andsearch_id, mirroring serpapi-ruby'sSerpApiError. Every request clears it, so it only describes the most recent call.{f}masks the key (abcd****wxyz), like serpapi-ruby'sinspect. The key moved out ofClient.params, so a{any}dump of the client state no longer shows it as bytes.searchArchiveHtml,searchArchiveMd,searchArchiveAsandlocationAs.rake releaserunslint test itest oobtfirst, and refuses unless it's onmasterwith a cleangit status --porcelainandSERPAPI_KEYset.engine(),apiKey(),serpapi.version, printing the client, andlastError().Breaking changes (shipping in 1.2.0 by decision)
Client.last_erroris now?serpapi.ErrorInfoinstead of?[]u8.api_keyis no longer inClient.params.items; useapiKey().Checks
zig build lint: passzig build test: 30/30zig build itest(live,SERPAPI_KEYset): 17/17zig build oobt: pass; it reports 1.2.0zig build cov(with the key): ~98%The README's pinned-dependency example stays at v1.1.0 until the v1.2.0 tag exists. #2 (image upload) is stacked on this branch.
🤖 Generated with Claude Code