escape fetch error message before saving in the db (closes #550)