Skip to content

Revert "Add detailed error logging for HTML/PDF generation failures"#686

Merged
KrzysztofPajak merged 1 commit intodevelopfrom
revert-684-copilot/add-error-logging-for-html-generation
Apr 29, 2026
Merged

Revert "Add detailed error logging for HTML/PDF generation failures"#686
KrzysztofPajak merged 1 commit intodevelopfrom
revert-684-copilot/add-error-logging-for-html-generation

Conversation

@KrzysztofPajak
Copy link
Copy Markdown
Member

Reverts #684

Copilot AI review requested due to automatic review settings April 29, 2026 19:14
@KrzysztofPajak KrzysztofPajak merged commit 49cc9a8 into develop Apr 29, 2026
6 of 7 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reverts #684 by removing the recently added “detailed error logging” around Razor-to-HTML rendering and HTML-to-PDF generation, returning these flows to straightforward exception propagation.

Changes:

  • Removed ILogger<> dependencies from ViewRenderService and HtmlToPdfService constructors.
  • Removed try/catch blocks that logged partial/full HTML content on render/PDF generation failures.
  • Restored direct calls to RenderAsync / ParseDocument / SaveAsPDF without additional logging.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/Web/Grand.Web.Common/ViewRender/ViewRenderService.cs Reverts detailed render-failure logging and removes ILogger injection.
src/Business/Grand.Business.Common/Services/Pdf/HtmlToPdfService.cs Reverts PDF-generation failure logging (including HTML content) and removes ILogger injection.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

_logger.LogError(ex, "Error generating PDF from order HTML. HTML content: {Html}", html);
throw;
}
TextReader sr = new StringReader(html);
_logger.LogError(ex, "Error generating PDF from shipment HTML. HTML content: {Html}", html);
throw;
}
TextReader sr = new StringReader(html);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants