Skip to content

[Feature Request] Multiple errors handling #631

Closed

Description

@odyfey

When using the errros.Join to return a result from a Work function, all errors are recorded as a single string in the database, which can be inconvenient when viewing a large number of errors in RiverUI. Below is an example code:

func (e *Example) Work(_ context.Context, job *river.Job[ExampleArgs]) error {
	var result []error

       ...

	return errors.Join(result...)
}

The reason for this behaviour may be use of ErrorStr method instead of errors.Unwrap when recording an error in the database.

How do you feel about supporting the recording of a slice of errors in the database and displaying them in RiverUI as a list separated by newlines?

Activity

  1. locked and limited conversation to collaborators on Oct 4, 2024
  2. converted this issue into a discussion #633 on Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions