Trigger meaningful error when VW consent screen is observed (#478)
This commit is contained in:
parent
8ce04e5aa8
commit
845422faf1
1 changed files with 4 additions and 0 deletions
|
|
@ -28,6 +28,10 @@ type Identity struct {
|
|||
func (v *Identity) redirect(resp *http.Response, err error) (*http.Response, error) {
|
||||
if err == nil {
|
||||
uri := resp.Header.Get("Location")
|
||||
if uri == "" {
|
||||
return nil, errors.New("could not find expected HTTP redirect header\ngo to https://www.portal.volkswagen-we.com/ check account status")
|
||||
}
|
||||
|
||||
resp, err = v.Get(uri)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue