Skip to content

Return destination write errors from rendering engines - #115

Open
bensynapse wants to merge 1 commit into
unrolled:v1from
bensynapse:fix-render-write-errors
Open

bensynapse wants to merge 1 commit into
unrolled:v1from
bensynapse:fix-render-write-errors

Conversation

@bensynapse

Copy link
Copy Markdown

I run Live Tennis API.

The buffered engines currently report success when a destination write fails. For example, rendering a body with HTTP 204 hides Go's http.ErrBodyNotAllowed.

Return destination errors from every engine and stop later engine writes after a failure. Streaming JSON also returns a failed prefix write before encoding.

Tests cover each output stage, including partial writes and exact successful output. Real HTTP 204 cases verify the returned error with DisableHTTPErrorRendering enabled.

make ci passes on Go 1.25.0. make test passes on Go 1.26.0, including configured lint, race tests and vet. Both package builds pass. All 139 new cases pass, and 95 regressions fail on unchanged v1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant