changeset 45 | b58a7ea1aeb2 |
parent 44 | 6da40ca4534c |
child 70 | 155fdea254c3 |
--- a/cmd/toot.go Sun Apr 30 20:45:40 2017 +0200 +++ b/cmd/toot.go Sun Apr 30 23:22:09 2017 +0200 @@ -6,8 +6,7 @@ package cmd import ( - "errors" - + "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/McKael/madon" @@ -76,7 +75,7 @@ fileMediaID, err := uploadFile(opt.mediaFilePath) if err != nil { - return nil, errors.New("cannot attach media file: " + err.Error()) + return nil, errors.Wrap(err, "cannot attach media file") } if fileMediaID > 0 { ids = append(ids, fileMediaID)