sj26/mailcatcher · info
Please submit this as an issue at https://github.com/sj2
Error message
Please submit this as an issue at https://github.com/sj26/mailcatcher/issues
What it means
The closing line of log_exception (lib/mail_catcher.rb:64): after printing context, exception, and backtrace, MailCatcher asks you to submit the report as a GitHub issue. It means the failure was unexpected enough that the library has no built-in remedy — it only guarantees the process keeps running (the callers rescue-and-continue).
Source
Thrown at lib/mail_catcher.rb:64
end
def browse url
if windows?
system "start", "/b", url
elsif which? "open"
system "open", url
end
end
def log_exception(message, context, exception)
gems_paths = (Gem.path | [Gem.default_dir]).map { |path| Regexp.escape(path) }
gems_regexp = %r{(?:#{gems_paths.join("|")})/gems/([^/]+)-([\w.]+)/(.*)}
gems_replace = '\1 (\2) \3'
puts "*** #{message}: #{context.inspect}"
puts " Exception: #{exception}"
puts " Backtrace:", *exception.backtrace.map { |line| " #{line.sub(gems_regexp, gems_replace)}" }
puts " Please submit this as an issue at https://github.com/sj26/mailcatcher/issues"
end
@@defaults = {
:smtp_ip => "127.0.0.1",
:smtp_port => "1025",
:http_ip => "127.0.0.1",
:http_port => "1080",
:http_path => "/",
:messages_limit => nil,
:verbose => false,
:daemon => !windows?,
:browse => false,
:quit => true,
}
def options
@@options
endView on GitHub (pinned to 18a9cb7a79)
Solutions
- Judge reportability by the Exception line: connection/disconnect classes (EPIPE, IOError) are noise; SQLite3 or parse errors that reproduce on the latest mailcatcher release are worth filing.
- Before filing, reproduce on the newest version (`gem update mailcatcher`) and with `--foreground --verbose`.
- File at https://github.com/sj26/mailcatcher/issues including all four printed lines (context, exception, backtrace) plus the sender/recipient shape and Ruby/gem versions.
- If it stems from an incompatible sqlite3/mail version, fix locally by pinning rather than reporting.
Defensive patterns
Strategy: fallback
Try / catch
# Wrap your own embedding path; only surface the report-worthy subset to GitHub
begin
MailCatcher::Mail.add_message(msg)
rescue => e
reportable = !(e.is_a?(IOError) || e.is_a?(Errno::EPIPE))
warn "submit-as-issue candidate: #{e.class}: #{e.message}" if reportable
end Prevention
- Filter disconnect-class exceptions out before considering an issue; they are client noise.
- Check existing issues with the exception line before filing — most recurring reports are known sqlite3/encoding bugs.
- Include Ruby version, mailcatcher version, and gem versions of frames in the rewritten backtrace when filing.
When it happens
Trigger: Printed after every exception funneled through log_exception: message-persistence failures in MailCatcher::Smtp#receive_message and websocket send failures in the /messages WS handler. You see it whenever either rescue fires, even for benign causes like a disconnected browser.
Common situations: Deciding whether an intermittent `Error sending message through websocket` report is worth reporting (usually not — it's a closed client); preparing a bug report for a repeatable `Error receiving message` crash; pasting the block into a GitHub issue after a gem upgrade broke mail storage.
Related errors
AI-assisted analysis of sj26/mailcatcher@18a9cb7a79 (2026-08-21).
Data as JSON: /api/errors/a50642bffbe474ee.
Report an issue: GitHub.