using Microsoft.AspNetCore.Http; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc; namespace DS.WMS.FeeBillRecvService { //public sealed class ArgumentExceptionHandler : IExceptionHandler //{ // public async ValueTask TryHandleAsync(HttpContext httpContext, Exception exception, CancellationToken cancellationToken) // { // httpContext.RequestServices.GetRequiredService>() // .LogError(exception, "Exception handled"); // if (exception is not ArgumentException) return false; // httpContext.Response.StatusCode = 400; // await httpContext.Response.WriteAsJsonAsync(new // { // exception.Message // }, cancellationToken); // return true; // } //} }