Index: src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php
===================================================================
--- src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php	(revision 42201)
+++ src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php	(working copy)
@@ -415,7 +415,7 @@
 			if ( $term_id = $term->get_error_data( 'term_exists' ) ) {
 				$existing_term = get_term( $term_id, $this->taxonomy );
 				$term->add_data( $existing_term->term_id, 'term_exists' );
-				$term->add_data( array( 'status' => 409 ) );
+				$term->add_data( array( 'status' => 409, 'term_id' => $term_id ) );
 			}
 
 			return $term;
Index: tests/phpunit/tests/rest-api/rest-categories-controller.php
===================================================================
--- tests/phpunit/tests/rest-api/rest-categories-controller.php	(revision 42201)
+++ tests/phpunit/tests/rest-api/rest-categories-controller.php	(working copy)
@@ -620,6 +620,7 @@
 
 	/**
 	 * @ticket 41370
+	 * @ticket 42597
 	 */
 	public function test_create_item_term_already_exists() {
 		wp_set_current_user( self::$administrator );
@@ -627,10 +628,19 @@
 		$request->set_param( 'name', 'test' );
 		$response = $this->server->dispatch( $request );
 		$this->assertEquals( 201, $response->get_status() );
+
+		$data = $response->get_data();
+		$term_id = $data['id'];
+		$this->assertTrue( (int) $term_id > 0 );
+
 		$response = $this->server->dispatch( $request );
 		$this->assertEquals( 409, $response->get_status() );
 		$data = $response->get_data();
 		$this->assertEquals( 'term_exists', $data['code'] );
+
+		$data = $response->get_data();
+		$this->assertEquals( (int) $data['data']['term_id'], $term_id );
+
 	}
 
 	public function test_create_item_invalid_taxonomy() {
