Merge pull request #60 from alexanderbeletsky/handle-409

Handle 409 error (empty repository)
This commit is contained in:
Buu Nguyen 2014-05-17 09:29:28 -07:00
commit 45e3fccda4
1 changed files with 18 additions and 13 deletions

View File

@ -163,6 +163,11 @@
else message = 'You have exceeded the GitHub API hourly limit and need GitHub access token to make extra requests. Follow <a href="https://github.com/settings/tokens/new" target="_blank">this link</a> to create one and paste it in the textbox below.'
}
else if (err.error === 409) {
header = 'Repository is empty or not yet available!'
message = 'This repository is not ready for browsing yet. Follow <a href="https://developer.github.com/v3/git/" target="_blank">this link</a> for details.'
}
updateSidebar('<div class="octotree_header_error">' + header + '</div>', message)
}