Skip to content

Commit

Permalink
Handle data.Exception value: show error message
Browse files Browse the repository at this point in the history
  • Loading branch information
will-moore committed Nov 24, 2023
1 parent bae750e commit ecdaa70
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/js/models/figure_model.js
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,11 @@
dataType: dataType,
// work with the response
success: function( data ) {
if (data.Exception) {
// If something went wrong, show error and don't add to figure
alert(`Image loading from ${imgDataUrl} included an Error: ${data.Exception}`);
return;
}

self.set('loading_count', self.get('loading_count') - 1);

Expand Down

0 comments on commit ecdaa70

Please sign in to comment.