mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
NPE in GithubApi.
This commit is contained in:
parent
f21efb6510
commit
dac01c371a
1 changed files with 9 additions and 2 deletions
|
@ -137,8 +137,15 @@ public class GithubApi @Inject constructor(val executors: KobaltExecutors,
|
|||
}
|
||||
} catch(e: RetrofitError) {
|
||||
val error = parseRetrofitError(e)
|
||||
throw KobaltException("Couldn't retrieve releases, ${error.message ?: e}: "
|
||||
+ error.errors[0].code + " field: " + error.errors[0].field)
|
||||
val details = if (error.errors != null) {
|
||||
error.errors[0]
|
||||
} else {
|
||||
null
|
||||
}
|
||||
// TODO: If the credentials didn't work ("bad credentials"), should start again
|
||||
// using cbeust/kobalt, like above. Right now, just bailing.
|
||||
log(2, "Couldn't retrieve releases from github, ${error.message ?: e}: "
|
||||
+ details?.code + " field: " + details?.field)
|
||||
}
|
||||
result
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue