refactor errors.go to use fmt.Sprintf instead of string concatenation