minor cleanup of error messages

- used same string for logging and error response to ensure they stay in
  sync
- pass through any http error status codes from remote URLs
This commit is contained in:
Will Norris 2014-11-21 17:56:59 -08:00
parent 8ada90ffd2
commit 2dd79ebd20
2 changed files with 13 additions and 8 deletions

View file

@ -154,7 +154,7 @@ func NewRequest(r *http.Request) (*Request, error) {
}
if req.URL.Scheme != "http" && req.URL.Scheme != "https" {
return nil, URLError{"remote URL must have http or https URL", r.URL}
return nil, URLError{"remote URL must have http or https scheme", r.URL}
}
// query string is always part of the remote URL