diff options
Diffstat (limited to 'routers/api/v1/utils/git.go')
-rw-r--r-- | routers/api/v1/utils/git.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/utils/git.go b/routers/api/v1/utils/git.go index 33aa3b81d6..af672ba147 100644 --- a/routers/api/v1/utils/git.go +++ b/routers/api/v1/utils/git.go @@ -26,7 +26,7 @@ func ResolveRefOrSha(ctx *context.APIContext, ref string) string { for _, refType := range []string{"heads", "tags"} { refSHA, lastMethodName, err := searchRefCommitByType(ctx, refType, ref) if err != nil { - ctx.APIError(http.StatusInternalServerError, fmt.Errorf("%s: %w", lastMethodName, err)) + ctx.APIErrorInternal(fmt.Errorf("%s: %w", lastMethodName, err)) return "" } if refSHA != "" { |