Errors with recordings no longer cause the page to 500 (#849)

This commit is contained in:
Ahmad Farhat
2019-11-01 14:37:38 -04:00
committed by Jesus Federico
parent e61946a0f4
commit da80fb55c7
3 changed files with 30 additions and 5 deletions

View File

@ -75,8 +75,20 @@
</td>
</tr>
<% else %>
<% failed_recordings = 0 %>
<% @recordings.each do |recording| %>
<%= render "admins/components/server_recording_row", recording: recording %>
<% begin %>
<%= render "admins/components/server_recording_row", recording: recording %>
<% rescue => e %>
<% logger.error "Error retrieving recording #{recording[:meetingID]}: #{e} -> #{e.backtrace[0]}" %>
<% failed_recordings += 1 %>
<% end %>
<% end %>
<% if failed_recordings > 0 %>
<div class="alert alert-danger alert-dismissible text-center mb-0">
<%= t("recording.error", count: failed_recordings) %>
</div>
<% end %>
<% end %>
</tbody>