The general journal lines are only deleted after posting the batch. But the events from the codeunit Gen. Jnl.-Post Line allow commit before the posting ends. This means after a commit and then an error in the event subscriber, both posted entry and journal line will remain in database.
Please add attribute `[CommitBehavior(CommitBehavior::Ignore)]` on codeunit Gen. Jnl.-Post Line OnAfterGLFinishPosting event publisher.
I added more details and reproduction steps in the https://github.com/microsoft/BCApps/issues.
Comments
GitHub issue link: https://github.com/microsoft/BCApps/issues/2192
Category: Financial Management

Business Central Team (administrator)
Thank you for this suggestion! Currently this is not on our roadmap. We are tracking this idea and if it gathers more votes and comments we will consider it in the future. Best regards, Business Central Team