You can also use the [DontWrapResult]/[WrapResult] attributes for individual application methods.
[WrapResult(LogError =false, WrapOnSuccess = true, WrapOnError = true)]
SomeApplicationServiceMethod()
[DontWrapResult(LogError =false, WrapOnError=false ,WrapOnSuccess=false)]
SomeApplicationServiceMethod()
If you can't do this, then you may make same changes in client side:
Add next class:
public class RequestResultAJAX<T>
{
public bool success { get; set; }
public T result { get; set; }
public string error { get; set; }
public string targetUrl { get; set; }
public string unAuthorizedRequest { get; set; }
public string __abp { get; set; }
}
Replace all Deserialization points in generated client method:
result_ = Newtonsoft.Json.JsonConvert.DeserializeObject<Dto>(responseData_, _settings.Value);
by
result_ = Newtonsoft.Json.JsonConvert.DeserializeObject<RequestResultAJAX<Dto>>(responseData_, _settings.Value).result;
And add success/error cheks before return result.