Permalink
Browse files

Some errors don't have backtraces preventing /failed to render in the…

… web service. Check instead to see if there is a backtrace and then render accordingly.
  • Loading branch information...
1 parent 84077cc commit f359bb4cd71a227dbe0261c216d40cb46a585160 @ealdent ealdent committed with defunkt Apr 20, 2010
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/resque/server/views/failed.erb
@@ -35,8 +35,12 @@
<dd><code><%= job['exception'] %></code></dd>
<dt>Error</dt>
<dd class='error'>
- <a href="#" class="backtrace"><%= h(job['error']) %></a>
- <pre style='display:none'><%=h job['backtrace'].join("\n") %></pre>
+ <% if job['backtrace'] %>
+ <a href="#" class="backtrace"><%= h(job['error']) %></a>
+ <pre style='display:none'><%=h job['backtrace'].join("\n") %></pre>
+ <% else %>
+ <%=h job['error'] %>
+ <% end %>
</dd>
</dl>
<div class='r'>

0 comments on commit f359bb4

Please sign in to comment.