feat(transcribe): StatusError.HTTPStatus -- its code, never its snippet, becomes the kind (review F3)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-02 16:39:38 +02:00
co-authored by Claude Sonnet 5.5
parent 2608ad2f09
commit 2d1b08458b
+3
View File
@@ -31,6 +31,9 @@ type StatusError struct {
Snippet string Snippet string
} }
// HTTPStatus implements errkind.HTTPStatuser: the code, never the snippet.
func (e *StatusError) HTTPStatus() int { return e.Code }
func (e *StatusError) Error() string { func (e *StatusError) Error() string {
return fmt.Sprintf("transcribe: gateway returned HTTP %d: %s", e.Code, e.Snippet) return fmt.Sprintf("transcribe: gateway returned HTTP %d: %s", e.Code, e.Snippet)
} }