Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Url to DocumentRenderErrorEvent #20543

Merged
merged 2 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
using System.Collections.Generic;

namespace Volo.Docs.Documents;

public class DocumentRenderErrorEvent
{
public string Name { get; set; }

public string ErrorMessage { get; set; }

public string Url { get; set; }

public Dictionary<string, string> UserPreferences { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,10 @@ protected virtual async Task OnSectionRenderingErrorAsync(Exception e)
Document.Content = $"````txt{Environment.NewLine}{message}{Environment.NewLine}````";
await LocalEventBus.PublishAsync(new DocumentRenderErrorEvent
{
ErrorMessage = message, Name = Document.Name
ErrorMessage = e.Message,
Name = Document.Name,
Url = Request.GetDisplayUrl(),
UserPreferences = UserPreferences
});

// Slow down with crawling
Expand Down
Loading