GitHost AutoConfigure: Handle errors a bit better

This commit is contained in:
Vishesh Handa
2019-01-25 14:52:56 +01:00
parent 15cedd75f1
commit fb202e0f1f
4 changed files with 79 additions and 30 deletions

View File

@ -30,7 +30,7 @@ class GitHub implements GitHost {
var authCode = uri.queryParameters['code'];
if (authCode == null) {
print("GitHub: Missing auth code. Now what?");
callback();
throw GitHostException.OAuthFailed;
}
this._accessCode = await _getAccessCode(authCode);
@ -51,7 +51,7 @@ class GitHub implements GitHost {
response.statusCode.toString() +
": " +
response.body);
return null;
throw GitHostException.OAuthFailed;
}
print("GithubResponse: " + response.body);