An error occurs (see image below) when the repo is initialized with zero files. I created a public repo - test to confirm this was not only caused for private repos(I found the problem while opening a private repo). The error is caused by fetchContributors. For example: https://api.github.com/repos/shreyas1599/test/stats/contributors does nothing. Does not even return an error message. I tried using the debugger and it returned an exception on this line of github.dart of SpinlockLabs.
I'm thinking there's no response and jsonDecode is throwing an error because nothing is returned by the request. Could this be the error or am I missing something?
Originally created by @shreyas1599 on GitHub (Aug 16, 2020).
Original GitHub issue: https://github.com/pd4d10/git-touch/issues/99
An error occurs (see image below) when the repo is initialized with zero files. I created a public repo - [test](https://github.com/shreyas1599/test) to confirm this was not only caused for private repos(I found the problem while opening a private repo). The error is caused by [fetchContributors](https://github.com/git-touch/git-touch/blob/1276957b2d14ad93b3762bb109a457711085d978/lib/screens/gh_repo.dart#L54). For example: https://api.github.com/repos/shreyas1599/test/stats/contributors does nothing. Does not even return an error message. I tried using the debugger and it returned an exception on [this line of github.dart](https://github.com/SpinlockLabs/github.dart/blob/3c88457815f3013fcbf54032567dca3815f3953e/lib/src/common/github.dart#L278) of SpinlockLabs.
I'm thinking there's no response and `jsonDecode` is throwing an error because nothing is returned by the request. Could this be the error or am I missing something?

I'm thinking there's no response and jsonDecode is throwing an error because nothing is returned by the request
Yeah, it seems so. Perhaps we should manually catch this error in this case.
<!-- gh-comment-id:703062874 -->
@pd4d10 commented on GitHub (Oct 3, 2020):
> I'm thinking there's no response and jsonDecode is throwing an error because nothing is returned by the request
Yeah, it seems so. Perhaps we should manually catch this error in this case.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @shreyas1599 on GitHub (Aug 16, 2020).
Original GitHub issue: https://github.com/pd4d10/git-touch/issues/99
An error occurs (see image below) when the repo is initialized with zero files. I created a public repo - test to confirm this was not only caused for private repos(I found the problem while opening a private repo). The error is caused by fetchContributors. For example: https://api.github.com/repos/shreyas1599/test/stats/contributors does nothing. Does not even return an error message. I tried using the debugger and it returned an exception on this line of github.dart of SpinlockLabs.
I'm thinking there's no response and
jsonDecodeis throwing an error because nothing is returned by the request. Could this be the error or am I missing something?@pd4d10 commented on GitHub (Oct 3, 2020):
Yeah, it seems so. Perhaps we should manually catch this error in this case.