Better title and notes formatting

This commit is contained in:
Ian Gulliver
2022-10-28 16:27:33 +00:00
parent 3c96973678
commit f758bf295a
3 changed files with 48 additions and 9 deletions

View File

@@ -3,8 +3,8 @@ package main
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"os"
)
@@ -69,7 +69,8 @@ func (ac *AsanaClient) CreateTask(name string, notes string) error {
}
if resp.StatusCode != 201 {
return errors.New(resp.Status)
msg, _ := io.ReadAll(resp.Body)
return fmt.Errorf("%s: %s", resp.Status, msg)
}
return nil