diff --git a/gtests/net/packetdrill/packet_to_string.c b/gtests/net/packetdrill/packet_to_string.c
index 226c0f82fc72b75cfc1c0fa84ca1b8514c002ecc..c40738af614ec092442425f6b4fd39a4b9a42ba8 100644
--- a/gtests/net/packetdrill/packet_to_string.c
+++ b/gtests/net/packetdrill/packet_to_string.c
@@ -158,6 +158,7 @@ static int sctp_packet_to_string(FILE *s, struct packet *packet, int i,
 		if (*error != NULL)
 			break;
 		result = sctp_chunk_to_string(s, chunk, error);
+		assert(result != STATUS_OK  || *error == NULL);
 		if (result != STATUS_OK)
 			break;
 		index++;