From a221c9e3bd630ae96b1f244308f068b1cb0a81dd Mon Sep 17 00:00:00 2001 From: Avinash-Sanpala <116023828+Avinash-Sanpala@users.noreply.github.com> Date: Mon, 11 Nov 2024 21:09:46 +0530 Subject: [PATCH] feat: Add optimized error message to the recipe event (#1256) --- pkg/installevents/installevents_api.go | 2 ++ pkg/installevents/types.go | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/pkg/installevents/installevents_api.go b/pkg/installevents/installevents_api.go index e9edec8c1..97438dc15 100644 --- a/pkg/installevents/installevents_api.go +++ b/pkg/installevents/installevents_api.go @@ -59,6 +59,7 @@ const InstallationCreateInstallStatusMutation = `mutation( error { details message + optimizedMessage } hostName installId @@ -136,6 +137,7 @@ const InstallationCreateRecipeEventMutation = `mutation( error { details message + optimizedMessage } hostName installId diff --git a/pkg/installevents/types.go b/pkg/installevents/types.go index 0d33cb2ac..cc62c5418 100644 --- a/pkg/installevents/types.go +++ b/pkg/installevents/types.go @@ -252,6 +252,8 @@ type InstallationStatusError struct { Details string `json:"details,omitempty"` // The actual error message. Message string `json:"message,omitempty"` + // An optimised message for the error. + OptimizedMessage string `json:"optimizedMessage,omitempty"` } // InstallationStatusErrorInput - An object that represents a status error whenever an recipe has failed to install. @@ -260,4 +262,6 @@ type InstallationStatusErrorInput struct { Details string `json:"details,omitempty"` // The actual error message. Message string `json:"message,omitempty"` + // An optimised message for the error. + OptimizedMessage string `json:"optimizedMessage,omitempty"` }