In SharePoint Online, I have a remote event receiver returning an error message for an ItemUpdating event on two different sites in two different site collections.
In one site, the error message is displayed in red at the bottom of the edit form. This is the behaviour I want. This site was created using C# CSOM and an empty site template.
In the other site, the error message is displayed in a new page with "Sorry, something went wrong" at the top and if the back button is clicked then some of the field data entered is cleared. This site was created with the UI and a team site template.
Any ideas how to change this behaviour?