Skip to content
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## [Unreleased]

- Leave the dashboard stylesheet out of the error email ([@namolnad](https://github.com/fractaledmind/solid_errors/pull/110))

## [0.8.0] - 2026-10-13

- Add `enabled` to turn off error tracking in an environment, such as test ([@kulturbande](https://github.com/fractaledmind/solid_errors/pull/96))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<html>
<head>
<title>Solid Errors | <%= @error.severity_emoji %> <%= @error.exception_class %></title>
<%= render "layouts/solid_errors/style" %>
<style>
body {
padding: 20px;
Expand Down
10 changes: 10 additions & 0 deletions test/mailers/solid_errors/error_mailer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ def deliver!(_mail)
assert_includes email.html_part.body.to_s, "oof"
end

# The email styles itself inline. The dashboard's Tailwind build is tens of kilobytes
# it never uses, and Gmail clips a message past about a hundred.
test "the error email leaves out the dashboard stylesheet" do
report_raised_error("oof")

email = SolidErrors::ErrorMailer.error_occurred(SolidErrors::Occurrence.last)

refute_includes email.html_part.body.to_s, "tailwindcss"
end

test "the error email links to the occurrence when the app has a mailer host" do
report_raised_error("oof")
occurrence = SolidErrors::Occurrence.last
Expand Down
Loading