diff --git a/api/pkg/echo/handlers/pkg/converter/converter.go b/api/pkg/echo/handlers/pkg/converter/converter.go index 1d373dd3a0c..bf84de814dc 100644 --- a/api/pkg/echo/handlers/pkg/converter/converter.go +++ b/api/pkg/echo/handlers/pkg/converter/converter.go @@ -28,6 +28,8 @@ func FromErrServiceToHTTPStatus(code int) int { return http.StatusForbidden case services.ErrCodeNoContentChange: return http.StatusNoContent + case services.ErrCodeNotImplemented: + return http.StatusNotImplemented default: return http.StatusInternalServerError } diff --git a/api/services/errors.go b/api/services/errors.go index 6236fcee825..969d26af979 100644 --- a/api/services/errors.go +++ b/api/services/errors.go @@ -34,6 +34,8 @@ const ( ErrCodeNoContentChange // ErrCodeCreated is the error code to be used when the resource was created, but the following operations failed. ErrCodeCreated + // ErrCodeNotImplemented is the error code to be used when the resource is not yet implemented. + ErrCodeNotImplemented ) // ErrDataNotFound structure should be used to add errors.Data to an error when the resource is not found.