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) }