From 1ee342127d9eb05dfe9c6c0c75f72074c83a802f Mon Sep 17 00:00:00 2001 From: e_forbes Date: Thu, 6 Nov 2025 14:17:46 +0000 Subject: [PATCH 1/3] feat: adds the error Field --- fields/fields.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fields/fields.go b/fields/fields.go index 930a4ee..1935a9c 100644 --- a/fields/fields.go +++ b/fields/fields.go @@ -15,4 +15,8 @@ const ( // GitLabUserName - a string field that // captures the user's username for logging purposes. GitLabUserName = "gl_user_name" + + // Error - a string field that should be used + // when attempting to log out any errors. + Error = "error" ) -- GitLab From 7e26cc4a15f9bbcd8473722dbc3d4e8231b8a822 Mon Sep 17 00:00:00 2001 From: Elliot Forbes Date: Tue, 11 Nov 2025 15:22:54 +0000 Subject: [PATCH 2/3] Add Error and ErrorMessage fields with clear separation of concerns Based on Bob's review feedback: - Error field: Contains the error type/classification (e.g., "NoMethodError") - ErrorMessage field: Contains the detailed error message (e.g., "undefined method `boom!' for nil") This separation allows for better error categorization and filtering in logs while still preserving the full error details. --- fields/fields.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fields/fields.go b/fields/fields.go index 1935a9c..f827bd1 100644 --- a/fields/fields.go +++ b/fields/fields.go @@ -16,7 +16,11 @@ const ( // captures the user's username for logging purposes. GitLabUserName = "gl_user_name" - // Error - a string field that should be used - // when attempting to log out any errors. + // Error - a string field that should contain the error type or classification + // (e.g., "NoMethodError", "ValidationError"). Error = "error" + + // ErrorMessage - a string field that should contain the detailed error message + // (e.g., "undefined method `boom!' for nil"). + ErrorMessage = "error_message" ) -- GitLab From f91e0e254017e853b61f3e3f7d597ce4f7e6e004 Mon Sep 17 00:00:00 2001 From: Elliot Forbes Date: Tue, 11 Nov 2025 15:25:01 +0000 Subject: [PATCH 3/3] Rename Error to ErrorType for better clarity Renamed the Error field to ErrorType to make it more explicit that this field should contain the error classification/type rather than the error itself. Fields: - ErrorType: Contains the error type/classification (e.g., "NoMethodError") - ErrorMessage: Contains the detailed error message (e.g., "undefined method `boom!' for nil") --- fields/fields.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fields/fields.go b/fields/fields.go index f827bd1..8e027bb 100644 --- a/fields/fields.go +++ b/fields/fields.go @@ -16,9 +16,9 @@ const ( // captures the user's username for logging purposes. GitLabUserName = "gl_user_name" - // Error - a string field that should contain the error type or classification + // ErrorType - a string field that should contain the error type or classification // (e.g., "NoMethodError", "ValidationError"). - Error = "error" + ErrorType = "error_type" // ErrorMessage - a string field that should contain the detailed error message // (e.g., "undefined method `boom!' for nil"). -- GitLab