Custom Error Message is not displaying for Remote Event Receiver
Custom Error Message is not displaying in Modern UI when a remote event receiver returns a status of SPRemoteEventServiceStatus.CancelWithError and an error message. It works as expected in classic UI.
We use a Remote Event Receiver to determine if a publishing action can complete or should be cancelled.
What we experience is that the modern UI displays a "failed" message instead of the custom error message.
However, if we switch to classic UI the error message shows as expected.
It seems like a bug in SP2019. How do we fix this issue?
Our environment is SharePoint server 2019. Build 16.0.10404.20003
This issue resemples the one described in https://learn.microsoft.com/en-us/answers/questions/399885/custom-error-message-is-not-displaying-remote-even