diff --git a/src/plugins/acct_gather_profile/hdf5/acct_gather_profile_hdf5.c b/src/plugins/acct_gather_profile/hdf5/acct_gather_profile_hdf5.c
index 4810e8150d57ae182d53a34e5572d09d3db48a3a..0d5e841275f09b8c4b0bf901e6f440c2eff50826 100644
--- a/src/plugins/acct_gather_profile/hdf5/acct_gather_profile_hdf5.c
+++ b/src/plugins/acct_gather_profile/hdf5/acct_gather_profile_hdf5.c
@@ -546,8 +546,10 @@ extern int acct_gather_profile_p_create_dataset(
 			field_id = H5T_NATIVE_DOUBLE;
 			field_size = sizeof(double);
 			break;
-		case PROFILE_FIELD_NOT_SET:
-			break;
+		default:
+			error("%s: unknown field type:%d",
+			      __func__, dataset_loc->type);
+			continue;
 		}
 		if (H5Tinsert(dtype_id, dataset_loc->name,
 			      offset, field_id) < 0)