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"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/url"
|
||||
"strconv"
|
||||
|
|
@ -122,7 +123,8 @@ func (s *Scraper) CreateTweet(tweet NewTweet) (*Tweet, error) {
|
|||
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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue