I'm trying to cancel a form submission in a custom actor based off this example: https://gist.github.com/AThraen/7917f6e2af9aec098ef60bac24868887
I've removed the message, but I still get the Failed to submit error. I can do some front end stuff to make it look like it worked, but was hoping there was another way from the backend. Is this possible?
Not sure that would be a good UX approach. Generally when something fails you want to inform the user that it happened and what they need to do to resolve it.
Why would you need to remove the message?
Have you tired just having: result.ErrorMessage = "";
I had a play with the gist you sent and that code is working as expected:
As you can see there are 2 areas the message is returned.
1 is your piece and I believe the second to be in the 'DataSubmissionService' this is an internal implementation, however you could recreate it just to see what is going on and then based on that information come up with an alternative / amended solution.
I would add if this is a bot they would only get this message a normal user would not see this message and it might be fine to live with the way it is.