mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-04 12:37:59 +00:00
Update deps
This commit is contained in:
11
vendor/github.com/google/go-github/github/github.go
generated
vendored
11
vendor/github.com/google/go-github/github/github.go
generated
vendored
@@ -85,9 +85,6 @@ const (
|
||||
// https://developer.github.com/changes/2016-07-06-github-pages-preiew-api/
|
||||
mediaTypePagesPreview = "application/vnd.github.mister-fantastic-preview+json"
|
||||
|
||||
// https://developer.github.com/v3/repos/traffic/
|
||||
mediaTypeTrafficPreview = "application/vnd.github.spiderman-preview+json"
|
||||
|
||||
// https://developer.github.com/changes/2016-09-14-projects-api/
|
||||
mediaTypeProjectsPreview = "application/vnd.github.inertia-preview+json"
|
||||
|
||||
@@ -409,6 +406,12 @@ func (c *Client) Do(req *http.Request, v interface{}) (*Response, error) {
|
||||
|
||||
resp, err := c.client.Do(req)
|
||||
if err != nil {
|
||||
if e, ok := err.(*url.Error); ok {
|
||||
if url, err := url.Parse(e.URL); err == nil {
|
||||
e.URL = sanitizeURL(url).String()
|
||||
return nil, e
|
||||
}
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -553,7 +556,7 @@ func (r *AbuseRateLimitError) Error() string {
|
||||
}
|
||||
|
||||
// sanitizeURL redacts the client_secret parameter from the URL which may be
|
||||
// exposed to the user, specifically in the ErrorResponse error message.
|
||||
// exposed to the user.
|
||||
func sanitizeURL(uri *url.URL) *url.URL {
|
||||
if uri == nil {
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user