diff --git a/src/class-wp-import.php b/src/class-wp-import.php
index 6d994aa..9875f93 100644
--- a/src/class-wp-import.php
+++ b/src/class-wp-import.php
@@ -430,7 +430,7 @@ class WP_Import extends WP_Importer {
 				}
 			} else {
 				printf( __( 'Failed to import category %s', 'wordpress-importer' ), esc_html( $cat['category_nicename'] ) );
-				if ( defined( 'IMPORT_DEBUG' ) && IMPORT_DEBUG ) {
+				if ( defined( 'IMPORT_DEBUG' ) && IMPORT_DEBUG && is_wp_error( $id ) ) {
 					echo ': ' . $id->get_error_message();
 				}
 				echo '<br />';
