Commit c8bf21ec authored by Andrei Mihu's avatar Andrei Mihu
Browse files

Log a more informative error message when social providers are unreachable or return errors

parent 132f4d17
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ The format is based on [keep a changelog](http://keepachangelog.com/) and this p
### Fixed
- Realtime notification routing now correctly resolves connected users.
- The server will now correctly log a reason when clients disconnect unexpectedly.
- Log a more informative error message when social providers are unreachable or return errors.

## [1.0.1] - 2017-08-05
### Added
+2 −1
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import (
	"encoding/json"
	"encoding/pem"
	"errors"
	"fmt"
	"io/ioutil"
	"net/http"
	"net/url"
@@ -263,7 +264,7 @@ func (c *Client) requestRaw(provider, path string, headers map[string]string) ([
		return nil, err
	}
	if resp.StatusCode != 200 {
		return nil, errors.New(provider + " error")
		return nil, fmt.Errorf("%v error url %v, status code %v, body %v", provider, path, resp.StatusCode, body)
	}
	return body, nil
}