Skip to content

Commit

Permalink
issue #571 - error to console
Browse files Browse the repository at this point in the history
  • Loading branch information
ayeshamk committed Sep 10, 2021
1 parent dd3c778 commit 708bae9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion server_py/flatgov/templates/bills/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -981,12 +981,20 @@ <h6 class="pt-2">
})
</script>
<script>
var apiCallCount = 0
var press_statements = $('#press-statements-table').DataTable({
"processing": true,
"serverSide": true,
"ajax": {
url: `/press-statements/{{bill.congress}}/{{bill.type}}/{{bill.number}}/`,

error: function () {
if (apiCallCount <= 3) {
setTimeout(() => {
apiCallCount++
press_statements.ajax.reload()
}, 3000);
}
},
},
pageLength : 20,
lengthChange : false,
Expand Down Expand Up @@ -1043,6 +1051,7 @@ <h6 class="pt-2">
info: "_START_ to _END_ of _TOTAL_ Press statements"
},
});
$.fn.dataTable.ext.errMode = 'throw';
</script>
<style>
div.dt-buttons {
Expand Down

0 comments on commit 708bae9

Please sign in to comment.