From fb90ed75379ce24c8bfc3356fbe0289bc8c8ec25 Mon Sep 17 00:00:00 2001 From: MUzairS15 Date: Tue, 30 Jul 2024 05:33:42 +0000 Subject: [PATCH] [Error Codes]: Update Meshery server and mehseryctl error codes and reference Signed-off-by: l5io --- docs/_data/errorref/meshery-server_errors_export.json | 9 +++++++++ docs/_data/errorref/mesheryctl_errors_export.json | 9 +++++++++ server/helpers/component_info.json | 2 +- server/models/error.go | 4 ++-- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/docs/_data/errorref/meshery-server_errors_export.json b/docs/_data/errorref/meshery-server_errors_export.json index 61b63fb2a0c..88e8a74e1bd 100644 --- a/docs/_data/errorref/meshery-server_errors_export.json +++ b/docs/_data/errorref/meshery-server_errors_export.json @@ -3206,6 +3206,15 @@ "short_description": "No session found in the request", "probable_cause": "User is not authenticated with the selected Provider.\nBrowser might be restricting use of cookies.", "suggested_remediation": "Choose a Provider and login to establish an active session (receive a new token and cookie). Optionally, try using a private/incognito browser window.\nVerify that your browser settings allow cookies." + }, + "1357": { + "name": "ErrInvalidEventDataCode", + "code": "1357", + "severity": "Alert", + "long_description": "ActedUpon, Action, Category and Severity are required fields of an event", + "short_description": "The event provided is not valid", + "probable_cause": "", + "suggested_remediation": "Ensure that ActedUpon, Action, Category and Severity are present in the event" } } } diff --git a/docs/_data/errorref/mesheryctl_errors_export.json b/docs/_data/errorref/mesheryctl_errors_export.json index 61b63fb2a0c..88e8a74e1bd 100644 --- a/docs/_data/errorref/mesheryctl_errors_export.json +++ b/docs/_data/errorref/mesheryctl_errors_export.json @@ -3206,6 +3206,15 @@ "short_description": "No session found in the request", "probable_cause": "User is not authenticated with the selected Provider.\nBrowser might be restricting use of cookies.", "suggested_remediation": "Choose a Provider and login to establish an active session (receive a new token and cookie). Optionally, try using a private/incognito browser window.\nVerify that your browser settings allow cookies." + }, + "1357": { + "name": "ErrInvalidEventDataCode", + "code": "1357", + "severity": "Alert", + "long_description": "ActedUpon, Action, Category and Severity are required fields of an event", + "short_description": "The event provided is not valid", + "probable_cause": "", + "suggested_remediation": "Ensure that ActedUpon, Action, Category and Severity are present in the event" } } } diff --git a/server/helpers/component_info.json b/server/helpers/component_info.json index 9aa8753a742..17f65a63f0f 100644 --- a/server/helpers/component_info.json +++ b/server/helpers/component_info.json @@ -1,5 +1,5 @@ { "name": "meshery-server", "type": "component", - "next_error_code": 1357 + "next_error_code": 1358 } \ No newline at end of file diff --git a/server/models/error.go b/server/models/error.go index 30a524635a2..ba3387168e6 100644 --- a/server/models/error.go +++ b/server/models/error.go @@ -96,7 +96,7 @@ const ( ErrUnreachableRemoteProviderCode = "meshery-server-1301" ErrShareFilterCode = "meshery-server-1302" ErrPersistEventCode = "meshery-server-1303" - ErrInvalidEventDataCode = "replace-me" + ErrInvalidEventDataCode = "meshery-server-1357" ErrUnreachableKubeAPICode = "meshery-server-1304" ErrFlushMeshSyncDataCode = "meshery-server-1305" ErrUpdateConnectionStatusCode = "meshery-server-1306" @@ -561,4 +561,4 @@ func ErrUpdateResource(name, namespace string) error { []string{}, []string{"Possible causes include invalid resource configuration, insufficient permissions, or network issues."}, []string{"Verify the resource configuration and ensure it is correct. Ensure you have the necessary permissions to update the resource. Check network connectivity to the Kubernetes cluster."}) -} \ No newline at end of file +}