BUG FIX: error property is sometimes a string