[fix] Automatically emit `end` if we redirect. Also emit error when we failed to process pagelets.ondata