Repository navigation
fix(api): centralize requests and correct tracking headers #14 - #17
Merged
Merged
Conversation
| cancel() | ||
| var timed net.Error | ||
| if errors.As(err, &timed) && timed.Timeout() { | ||
| return nil, types.NetworkError("LinkedIn request timed out", context.DeadlineExceeded) |
There was a problem hiding this comment.
🛡️ Medium Only login/authwall-style redirect targets are classified as auth expiry. A 302 redirect back to the same Voyager URL (a known expired-session pattern) is treated as a generic network redirect error, so callers miss the re-auth path and surface the wrong failure mode.
Suggested change
| return nil, types.NetworkError("LinkedIn request timed out", context.DeadlineExceeded) | |
| if loc := resp.Header.Get("Location"); authRedirect(u, loc) || loc == u.RequestURI() || loc == u.String() { |
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 #14
M1 of #13. Centralizes all authenticated LinkedIn send paths, rejects redirects with default and injected clients, corrects duplicate tracking JSON fields and keeps mutations single-shot. No native Android identity claim; existing legacy header version remains intentionally unchanged.
Verification on ac29d75:
Dependent M2 #15 adds durable pacing, quota and refusal state. This PR intentionally retains existing read retry behavior until M2. M3 #16 documents final behavior and release compatibility.
Local act warnings: exported tree has no Git metadata and setup-go skipped cache save. All actual vet, race tests and formatting steps passed.