I have a problem in HotTowel template. how can I catch sql duplicate unique key value exception in breeze js and display that?
my controller:
[BreezeController]
[System.Web.Http.Authorize]
public partial class DataServiceController : ApiController
{
[System.Web.Http.HttpPost]
public SaveResult SaveChanges(JObject saveBundle)
{
SaveResult result;
try
{
result = this._contextProvider.SaveChanges(saveBundle, null);
}
catch (Exception ex)
{
throw ex;
}
return result;
}
}