@@ -692,7 +692,7 @@ func checkCitationFile(ctx *context.Context, entry *git.TreeEntry) {
692692 }
693693 tree , err := ctx .Repo .Commit .SubTree (ctx .Repo .TreePath )
694694 if err != nil {
695- ctx . NotFoundOrServerError ( "Repo.Commit.SubTree" , git . IsErrNotExist , err )
695+ HandleGitError ( ctx , "Repo.Commit.SubTree" , err )
696696 return
697697 }
698698 allEntries , err := tree .ListEntries ()
@@ -783,7 +783,7 @@ func LastCommit(ctx *context.Context) {
783783func renderDirectoryFiles (ctx * context.Context , timeout time.Duration ) git.Entries {
784784 tree , err := ctx .Repo .Commit .SubTree (ctx .Repo .TreePath )
785785 if err != nil {
786- ctx . NotFoundOrServerError ( "Repo.Commit.SubTree" , git . IsErrNotExist , err )
786+ HandleGitError ( ctx , "Repo.Commit.SubTree" , err )
787787 return nil
788788 }
789789
@@ -792,12 +792,12 @@ func renderDirectoryFiles(ctx *context.Context, timeout time.Duration) git.Entri
792792 // Get current entry user currently looking at.
793793 entry , err := ctx .Repo .Commit .GetTreeEntryByPath (ctx .Repo .TreePath )
794794 if err != nil {
795- ctx . NotFoundOrServerError ( "Repo.Commit.GetTreeEntryByPath" , git . IsErrNotExist , err )
795+ HandleGitError ( ctx , "Repo.Commit.GetTreeEntryByPath" , err )
796796 return nil
797797 }
798798
799799 if ! entry .IsDir () {
800- ctx . NotFoundOrServerError ( "Repo.Commit.GetTreeEntryByPath" , git . IsErrNotExist , err )
800+ HandleGitError ( ctx , "Repo.Commit.GetTreeEntryByPath" , err )
801801 return nil
802802 }
803803
@@ -963,7 +963,7 @@ func renderCode(ctx *context.Context) {
963963 // Get current entry user currently looking at.
964964 entry , err := ctx .Repo .Commit .GetTreeEntryByPath (ctx .Repo .TreePath )
965965 if err != nil {
966- ctx . NotFoundOrServerError ( "Repo.Commit.GetTreeEntryByPath" , git . IsErrNotExist , err )
966+ HandleGitError ( ctx , "Repo.Commit.GetTreeEntryByPath" , err )
967967 return
968968 }
969969
0 commit comments