Skip to content

TODO: audit error returns #2

@elmiko

Description

@elmiko

make sure that some context is being added at every notable function to make debugging easier.

currently, there are several locations in the code where we wrap an error return without adding any meaningful context. this can make debugging challenging as it is not clear where an error originated from when multiple call paths could return a similar error message.

this issue is about adding more context to errors that are returned. the idea being that when we see code like:

	if err != nil {
		return nil, err
	}

we should transform into something that adds context, like this:

	if err != nil {
		return nil, fmt.Errorf("return error from function X because Y thing didn't happen, error: %w", err)
	}

Metadata

Metadata

Assignees

Labels

good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.kind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions