@@ -692,7 +692,7 @@ func checkCitationFile(ctx *context.Context, entry *git.TreeEntry) {
692
692
}
693
693
tree , err := ctx .Repo .Commit .SubTree (ctx .Repo .TreePath )
694
694
if err != nil {
695
- ctx . NotFoundOrServerError ( "Repo.Commit.SubTree" , git . IsErrNotExist , err )
695
+ HandleGitError ( ctx , "Repo.Commit.SubTree" , err )
696
696
return
697
697
}
698
698
allEntries , err := tree .ListEntries ()
@@ -783,7 +783,7 @@ func LastCommit(ctx *context.Context) {
783
783
func renderDirectoryFiles (ctx * context.Context , timeout time.Duration ) git.Entries {
784
784
tree , err := ctx .Repo .Commit .SubTree (ctx .Repo .TreePath )
785
785
if err != nil {
786
- ctx . NotFoundOrServerError ( "Repo.Commit.SubTree" , git . IsErrNotExist , err )
786
+ HandleGitError ( ctx , "Repo.Commit.SubTree" , err )
787
787
return nil
788
788
}
789
789
@@ -792,12 +792,12 @@ func renderDirectoryFiles(ctx *context.Context, timeout time.Duration) git.Entri
792
792
// Get current entry user currently looking at.
793
793
entry , err := ctx .Repo .Commit .GetTreeEntryByPath (ctx .Repo .TreePath )
794
794
if err != nil {
795
- ctx . NotFoundOrServerError ( "Repo.Commit.GetTreeEntryByPath" , git . IsErrNotExist , err )
795
+ HandleGitError ( ctx , "Repo.Commit.GetTreeEntryByPath" , err )
796
796
return nil
797
797
}
798
798
799
799
if ! entry .IsDir () {
800
- ctx . NotFoundOrServerError ( "Repo.Commit.GetTreeEntryByPath" , git . IsErrNotExist , err )
800
+ HandleGitError ( ctx , "Repo.Commit.GetTreeEntryByPath" , err )
801
801
return nil
802
802
}
803
803
@@ -963,7 +963,7 @@ func renderCode(ctx *context.Context) {
963
963
// Get current entry user currently looking at.
964
964
entry , err := ctx .Repo .Commit .GetTreeEntryByPath (ctx .Repo .TreePath )
965
965
if err != nil {
966
- ctx . NotFoundOrServerError ( "Repo.Commit.GetTreeEntryByPath" , git . IsErrNotExist , err )
966
+ HandleGitError ( ctx , "Repo.Commit.GetTreeEntryByPath" , err )
967
967
return
968
968
}
969
969
0 commit comments