fix: error using same token (#83)

Fixes #82
This commit is contained in:
Shreyas Thirumalai 2020-05-09 12:13:56 +05:30 committed by GitHub
parent bc3a204c2b
commit e173713861
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -148,8 +148,14 @@ class AuthModel with ChangeNotifier {
if (info['message'] != null) {
throw info['message'];
}
if (info['error'] != null) {
throw info['error'] +
'. ' +
(info['error_description'] != null
? info['error_description']
: '');
}
final user = GitlabUser.fromJson(info);
await _addAccount(Account(
platform: PlatformType.gitlab,
domain: domain,