catch 202 early

This commit is contained in:
Daniel Smith
2014-06-22 18:14:32 -07:00
parent 5ce54bb77b
commit 72809f8e67
3 changed files with 59 additions and 0 deletions

View File

@@ -166,6 +166,14 @@ func (r *Request) Do() Result {
return Result{err: err}
}
respBody, err := r.c.doRequest(req)
if err != nil {
if statusErr, ok := err.(*StatusErr); ok {
// TODO: using the information in statusErr,
// loop querying the server to wait and retrieve
// the actual result.
_ = statusErr
}
}
return Result{respBody, err}
}