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?
When using the
errros.Join
to return a result from aWork
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: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?