debug: log raw response on tweet create failure
This commit is contained in:
parent
85c852f4bb
commit
9d847cd18e
1 changed files with 3 additions and 1 deletions
4
tweet.go
4
tweet.go
|
|
@ -4,6 +4,7 @@ import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"net/url"
|
"net/url"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
@ -122,7 +123,8 @@ func (s *Scraper) CreateTweet(tweet NewTweet) (*Tweet, error) {
|
||||||
return result, nil
|
return result, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil, errors.New("tweet wasn't post")
|
raw, _ := json.Marshal(response)
|
||||||
|
return nil, fmt.Errorf("tweet wasn't post: %s", raw)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Scraper) DeleteTweet(tweetId string) error {
|
func (s *Scraper) DeleteTweet(tweetId string) error {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue