Skip to content

add detailed logs before every error is returned #20

@thomasdfischer

Description

@thomasdfischer

Also add logs when returning !ok.

For example, this snippet

func parseFileKey(path string) (*backend.FileKey, bool) {
	elems := strings.Split(path, "/")
	if len(elems) < 4 || elems[len(elems)-1] == "" {
		return nil, false
	}

should be transformed to this

func parseFileKey(path string) (*backend.FileKey, bool) {
	elems := strings.Split(path, "/")
	if len(elems) < 4 || elems[len(elems)-1] == "" {
		log.WithFields(log.Fields{
			"path":  path,
			"elems": elems,
		}).Warn("parseFileKey failed")
		return nil, false
	}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions