From 2d1b08458b97c6f01870c0355b5ce7e7483047bc Mon Sep 17 00:00:00 2001 From: Mathias Date: Fri, 2 Oct 2026 16:39:38 +0200 Subject: [PATCH] feat(transcribe): StatusError.HTTPStatus -- its code, never its snippet, becomes the kind (review F3) Co-Authored-By: Claude Sonnet 5.5 --- internal/adapters/transcribe/gateway.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/adapters/transcribe/gateway.go b/internal/adapters/transcribe/gateway.go index 763fcc4..106798a 100644 --- a/internal/adapters/transcribe/gateway.go +++ b/internal/adapters/transcribe/gateway.go @@ -31,6 +31,9 @@ type StatusError struct { Snippet string } +// HTTPStatus implements errkind.HTTPStatuser: the code, never the snippet. +func (e *StatusError) HTTPStatus() int { return e.Code } + func (e *StatusError) Error() string { return fmt.Sprintf("transcribe: gateway returned HTTP %d: %s", e.Code, e.Snippet) }