Skip to content

[Feature Request] Multiple errors handling #631

@odyfey

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions