Use explicit $.ajax dataType and add error callback
console.log -> console.error
Merge pull request #733 from ivan/master

Use explicit $.ajax dataType and add error callback