diff --git a/internal/gitaly/service/operations/commit_files.go b/internal/gitaly/service/operations/commit_files.go index 24f376801ea10012c3fffa982fbd3acd7b80b935..6063a1137a33daf5163e6b1abb08a19938dfafd3 100644 --- a/internal/gitaly/service/operations/commit_files.go +++ b/internal/gitaly/service/operations/commit_files.go @@ -80,7 +80,7 @@ func (s *Server) UserCommitFiles(stream gitalypb.OperationService_UserCommitFile }, ) case errors.As(err, &customHookErr): - return structerr.NewPermissionDenied("denied by custom hooks").WithDetail( + return structerr.NewPermissionDenied("Error: Denied by custom hooks.").WithDetail( &gitalypb.UserCommitFilesError{ Error: &gitalypb.UserCommitFilesError_CustomHook{ CustomHook: customHookErr.Proto(), diff --git a/internal/gitaly/service/operations/commit_files_test.go b/internal/gitaly/service/operations/commit_files_test.go index b2293d3c8a3d6f73dae91ac6ac080584b9b7a15a..b68579a9f9d57b2537168ec9b78748439b4f6dc9 100644 --- a/internal/gitaly/service/operations/commit_files_test.go +++ b/internal/gitaly/service/operations/commit_files_test.go @@ -1054,7 +1054,7 @@ func TestUserCommitFilesQuarantine(t *testing.T) { require.NoError(t, stream.Send(actionContentRequest("content"))) _, err = stream.CloseAndRecv() - testhelper.RequireGrpcError(t, structerr.NewPermissionDenied("denied by custom hooks").WithDetail( + testhelper.RequireGrpcError(t, structerr.NewPermissionDenied("Error: Denied by custom hooks.").WithDetail( &gitalypb.UserCommitFilesError{ Error: &gitalypb.UserCommitFilesError_CustomHook{ CustomHook: &gitalypb.CustomHookError{ @@ -1498,7 +1498,7 @@ func TestFailedUserCommitFilesRequestDueToHooks(t *testing.T) { expectedOut := fmt.Sprintf("GL_ID=%s GL_USERNAME=%s\n", gittest.TestUser.GlId, gittest.TestUser.GlUsername) - testhelper.RequireGrpcError(t, structerr.NewPermissionDenied("denied by custom hooks").WithDetail( + testhelper.RequireGrpcError(t, structerr.NewPermissionDenied("Error: Denied by custom hooks.").WithDetail( &gitalypb.UserCommitFilesError{ Error: &gitalypb.UserCommitFilesError_CustomHook{ CustomHook: &gitalypb.CustomHookError{