[api] give a message for the assert in event_test