<% error = error.is_a?(Lookbook::Error) ? error : Lookbook::Error.new(error) @title = error.title %>

<%= error.title %>

<%= error.message %>
<% if error.file_name %>
<%= error.file_name %> <% if error.line_number %> [line <%= error.line_number %>] <% end %>
<% end %> <% if error.source_code %>
<%= render_component :code, language: error.file_lang, highlight_lines: [error.source_code[:highlighted_line]], start_line: error.source_code[:start_line], line_numbers: true do %><%= h(error.source_code[:code]) %><% end %>
<% end %>

Full stack trace:

<% error.backtrace.each do |line| %>
<%= line %>
<% end %>