Merge pull request #60 from alexanderbeletsky/handle-409
Handle 409 error (empty repository)
This commit is contained in:
commit
45e3fccda4
|
@ -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 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)
|
updateSidebar('<div class="octotree_header_error">' + header + '</div>', message)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue