From 34d7f77ae77bb6baccca1c4319f40606bd7a9aca Mon Sep 17 00:00:00 2001 From: Aphral Griffin Date: Thu, 19 Dec 2024 11:00:49 +0000 Subject: [PATCH] feedback --- internal/resource/resource_plugin.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/resource/resource_plugin.go b/internal/resource/resource_plugin.go index 98a3b7430..62f4437b6 100644 --- a/internal/resource/resource_plugin.go +++ b/internal/resource/resource_plugin.go @@ -166,7 +166,7 @@ func (r *Resource) handleNginxPlusActionRequest(ctx context.Context, action *mpi correlationID := logger.GetCorrelationID(ctx) instance := r.resourceService.Instance(instanceID) if instance == nil { - slog.Info("Unable to find instance with ID", "id", instanceID) + slog.ErrorContext(ctx, "Unable to find instance with ID", "id", instanceID) resp := r.createDataPlaneResponse(correlationID, mpi.CommandResponse_COMMAND_STATUS_FAILURE, "", instanceID, fmt.Sprintf("failed to preform API "+ "action, could not find instance with ID: %s", instanceID)) @@ -175,7 +175,7 @@ func (r *Resource) handleNginxPlusActionRequest(ctx context.Context, action *mpi } if instance.GetInstanceMeta().GetInstanceType() != mpi.InstanceMeta_INSTANCE_TYPE_NGINX_PLUS { - slog.ErrorContext(ctx, "", "err", errors.New("failed to preform API action, instance is not NGINX Plus")) + slog.ErrorContext(ctx, "Failed to preform API action", "error", errors.New("instance is not NGINX Plus")) resp := r.createDataPlaneResponse(correlationID, mpi.CommandResponse_COMMAND_STATUS_FAILURE, "", instanceID, "failed to preform API action, instance is not NGINX Plus")