Skip to content

Conversation

@ettec
Copy link
Collaborator

@ettec ettec commented Nov 13, 2025

draft
Note, there are no changes required to the DON2DON shims in this version of the change which is the simple solution of prepending a string to the error to indicate its a user error (like is already done for remote reportable). Its possible that error metadata could be added to the response instead, however that will entail some change to the DON2DON shims (for example the response is not currently returned in the error case), so need to consider backwards compatability. Possibly a part 2, need to consider this some more.

@github-actions
Copy link
Contributor

I see you updated files related to core. Please run pnpm changeset in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

// TODO whats the correct combination of events/metrics/logging and statuses for user errors?
c.lggr.Debugw("Capability execution succeeded with user error", "capID", request.Id, "capReqCallbackID", request.CallbackId, "userErr", err)
_ = events.EmitCapabilityFinishedEvent(ctx, loggerLabels, c.WorkflowExecutionID, request.Id, meteringRef, store.StatusCompleted, request.Method, err)
c.metrics.IncrementTotalWorkflowStepErrorsCounter(ctx)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably want to change this into a new metric specifically for user errors.

@fernandezlautaro
Copy link
Contributor

shouldn't you also change the server_request.go to handle old

var reportableError *capabilities.RemoteReportableError
if errors.As(err, &reportableError) {
	return nil, fmt.Errorf("failed to execute capability: %w", reportableError)
}

in favour of

var userError *RemoteReportableUserError
if errors.As(err, &userError) {
	return nil, fmt.Errorf("failed to execute capability (user error): %w", userError)
}
var reportableError *capabilities.RemoteReportableError
if errors.As(err, &reportableError) {
	return nil, fmt.Errorf("failed to execute capability: %w", reportableError)
}

@cl-sonarqube-production
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants