Fix onerror test
Merge pull request #329 from teddyzeenny/notify-unhandled-only-at-end-of-turn

Fix onerror test