Activities of "coop1"

Hi there,

I have a Razor form that is creating a new entry in the database with a Name field that must be unique. I am performing server-side validation in the OnPostAsync method and if the submitted Name entry already exists in the database, the method returns an error. The returned error object is a Microsoft.AspNetCore.Mvc.ContentResult with the StatusCode set to 400 and the Content set to an error message stating the submitted name already exists, this causes the ABP "An error has occurred!" modal to pop up but the message is not displayed, and instead the modal just says "Error detail not sent by server.". How do I properly return an error from the server side so that my custom error message can be displayed?

Thank you!

Showing 1 to 1 of 1 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11