Index: wp-includes/taxonomy.php
===================================================================
--- wp-includes/taxonomy.php	(revision 15339)
+++ wp-includes/taxonomy.php	(working copy)
@@ -1647,9 +1647,9 @@
 			if ( false === $wpdb->insert( $wpdb->terms, compact( 'name', 'slug', 'term_group' ) ) )
 				return new WP_Error('db_insert_error', __('Could not insert term into the database'), $wpdb->last_error);
 			$term_id = (int) $wpdb->insert_id;
-		} elseif ( term_exists( (int) $term_id, $taxonomy ) )  {
+		} elseif ( $exists = term_exists( (int) $term_id, $taxonomy ) )  {
 			// Same name, same slug.
-			return new WP_Error('term_exists', __('A term with the name provided already exists.'));
+			return new WP_Error('term_exists', __('A term with the name provided already exists.'), $exists);
 		}
 	} else {
 		// This term does not exist at all in the database, Create it.
Index: xmlrpc.php
===================================================================
--- xmlrpc.php	(revision 15339)
+++ xmlrpc.php	(working copy)
@@ -933,9 +933,15 @@
 			"category_description"	=> $category["description"]
 		);
 
-		$cat_id = wp_insert_category($new_category);
-		if ( !$cat_id )
+		$cat_id = wp_insert_category($new_category, true);
+		if ( is_wp_error( $cat_id ) ) {
+			if ( 'term_exists' == $cat_id->get_error_code() )
+				return $cat_id->get_error_data();
+			else
+				return(new IXR_Error(500, __("Sorry, the new category failed.")));
+		} elseif ( ! $cat_id ) {
 			return(new IXR_Error(500, __("Sorry, the new category failed.")));
+		}
 
 		return($cat_id);
 	}
