Skip to content

Add Error Response Decoding#36

Merged
matoszz merged 3 commits intomainfrom
feat-impr
Feb 27, 2026
Merged

Add Error Response Decoding#36
matoszz merged 3 commits intomainfrom
feat-impr

Conversation

@matoszz
Copy link
Member

@matoszz matoszz commented Feb 27, 2026

As part of changes to sleuth, realized httpsling lacked typed error response decoding so I added OnError(v any) and ReceiveIntoWithError[S, E any] so callers can decode 2xx and 4xx/5xx into separate structs in a single call

Also fixed several bugs while I was in here: nil panic in IsSuccess, fragile media type parsing in generalMediaType, redundant strings.ToLower inside strings.EqualFold, and a slice mutation bug in ReceiveIntoWithError. Pulled in all outstanding dependencies.

@matoszz matoszz requested a review from a team as a code owner February 27, 2026 00:08
@github-actions github-actions bot added the enhancement New feature or request label Feb 27, 2026
@sonarqubecloud
Copy link

@matoszz matoszz enabled auto-merge (squash) February 27, 2026 00:12
@matoszz matoszz merged commit 295a6e4 into main Feb 27, 2026
11 checks passed
@matoszz matoszz deleted the feat-impr branch February 27, 2026 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants