Skip to content

Commit

Permalink
github: better propagation of status codes, better error pages
Browse files Browse the repository at this point in the history
  • Loading branch information
jclulow committed Jan 24, 2024
1 parent eb672d3 commit a96ed9c
Show file tree
Hide file tree
Showing 6 changed files with 465 additions and 156 deletions.
14 changes: 14 additions & 0 deletions github/database/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,24 @@ impl Database {
self.sql.tx(|h| h.get_row(CheckRun::find(id)))
}

pub fn load_check_run_opt(
&self,
id: CheckRunId,
) -> DBResult<Option<CheckRun>> {
self.sql.tx(|h| h.get_row_opt(CheckRun::find(id)))
}

pub fn load_check_suite(&self, id: CheckSuiteId) -> DBResult<CheckSuite> {
self.sql.tx(|h| h.get_row(CheckSuite::find(id)))
}

pub fn load_check_suite_opt(
&self,
id: CheckSuiteId,
) -> DBResult<Option<CheckSuite>> {
self.sql.tx(|h| h.get_row_opt(CheckSuite::find(id)))
}

pub fn load_check_suite_by_github_id(
&self,
repo: i64,
Expand Down
Loading

0 comments on commit a96ed9c

Please sign in to comment.