From 06bf3c04829c8d3124f7bb8d91b4dcef3a516dbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 8 Apr 2022 12:04:58 +0200 Subject: [PATCH] Cleanup: manager, fix copy-paste from original OpenAPI example code --- internal/manager/api_impl/api_impl.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/manager/api_impl/api_impl.go b/internal/manager/api_impl/api_impl.go index 2bbc93a3..f8589d79 100644 --- a/internal/manager/api_impl/api_impl.go +++ b/internal/manager/api_impl/api_impl.go @@ -144,7 +144,7 @@ func NewFlamenco( } } -// sendPetstoreError wraps sending of an error in the Error format, and +// sendAPIError wraps sending of an error in the Error format, and // handling the failure to marshal that. func sendAPIError(e echo.Context, code int, message string, args ...interface{}) error { if len(args) > 0 { @@ -152,11 +152,11 @@ func sendAPIError(e echo.Context, code int, message string, args ...interface{}) message = fmt.Sprintf(message, args) } - petErr := api.Error{ + apiErr := api.Error{ Code: int32(code), Message: message, } - return e.JSON(code, petErr) + return e.JSON(code, apiErr) } // sendAPIErrorDBBusy sends a HTTP 503 Service Unavailable, with a hopefully