joshsoftware / joshsoftware/code-curiosity

Repository#info might raise an exception since its an API call and needs to be handled.

Open
#183 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Ruby
Stars
87
Forks
57
PR merge metrics
No merged PRs in 30d

Description

[Repository#info](https://github.com/joshsoftware/code-curiosity/blob/master/app/models/repository.rb#L55) calls Github API to get repository information. These might raise any exception like Github::Error::Forbidden incase of rate limit hitting or Github::Error::NotFound if the repository is not found. Since this method is used in [UserReposJob](https://github.com/joshsoftware/code-curiosity/blob/master/app/jobs/user_repos_job.rb#L39), where we retrieve and persist the user's repositories, this might crash. Currently in development, in case of any exception, the job fails without warnings, aborting checking and persisting the [other](https://github.com/joshsoftware/code-curiosity/blob/master/app/jobs/user_repos_job.rb#L15) retrieved repositories.

Same for [Commit#info](https://github.com/joshsoftware/code-curiosity/blob/master/app/models/commit.rb#L43)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.