Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
aphralG committed Dec 19, 2024
1 parent de29b7a commit 34d7f77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/resource/resource_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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")

Expand Down

0 comments on commit 34d7f77

Please sign in to comment.