Skip to content

Commit

Permalink
Audio: Display the error message instead of "Object [Object]"
Browse files Browse the repository at this point in the history
  • Loading branch information
mjs committed Aug 13, 2018
1 parent e4d9d49 commit f94f34a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion public/javascripts/viewAudioRecording.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ window.onload = function() {

function requestError(err) {
console.log(err);
window.alert(err);
const message = err.responseJSON.message;
if (message) {
window.alert(message);
} else {
window.alert(err);
}
}

function requestSuccess(res) {
Expand Down

0 comments on commit f94f34a

Please sign in to comment.