diff --git a/modules/taxonomy/taxonomy.pages.inc b/modules/taxonomy/taxonomy.pages.inc
index 59dad6d..aa5b6e1 100755
--- a/modules/taxonomy/taxonomy.pages.inc
+++ b/modules/taxonomy/taxonomy.pages.inc
@@ -77,10 +77,21 @@ function taxonomy_term_feed($term) {
 }
 
 /**
- * Helper function for autocompletion
+ * AJAX page callback for taxonomy tag autocompletion.
+ *
+ * @param $field_name
+ *   The name of the tag field.
+ * @param $tags_typed
+ *   A comma-separated list of tags that the user has entered into the field.
  */
 function taxonomy_autocomplete($field_name, $tags_typed = '') {
-  $field = field_info_field($field_name);
+  // Make sure the field exists and is a taxonomy field.
+  if (!($field = field_info_field($field_name)) || $field['type'] !== 'taxonomy_term_reference') {
+    // Error string. The JavaScript handler will realize this is not JSON and
+    // will display it as debugging information.
+    print t('Taxonomy field @field_name not found.', array('@field_name' => $field_name));
+    exit;
+  }
 
   // The user enters a comma-separated list of tags. We only autocomplete the last tag.
   $tags_typed = drupal_explode_tags($tags_typed);
diff --git a/modules/taxonomy/taxonomy.test b/modules/taxonomy/taxonomy.test
index a561a40..0de334c 100755
--- a/modules/taxonomy/taxonomy.test
+++ b/modules/taxonomy/taxonomy.test
@@ -598,6 +598,14 @@ class TaxonomyTermTestCase extends TaxonomyWebTestCase {
     $input = substr($term2->name, 0, 3);
     $this->drupalGet('taxonomy/autocomplete/taxonomy_' . $this->vocabulary->machine_name . '/' . $input);
     $this->assertRaw('{"' . $term2->name . '":"' . $term2->name . '"}', t('Autocomplete returns term %term_name after typing the first 3 letters.', array('%term_name' 
+
+    // Test taxonomy_autocomplete with non-exisitant field (See #814804)
+    $field_name = $this->randomName();
+    $tag = $this->randomName();
+    $message = 'Taxonomy field ' . $field_name . ' not found.';
+    $this->assertFalse(field_info_field($field_name), t('Field %field_name does not exsist.', array('%field_name' => $field_name)));
+    $this->drupalGet('taxonomy/autocomplete/' . $field_name . '/' . $tag);
+    $this->assertRaw($message, t('Autocomplete returns "%message" when feild_name = %field_name does not exsist.', array('%message' => $message, '%field_name' => $fiel
   }
 
   /**
