Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public async void OnActionExecuting(HttpActionContext actionContext)
- {
- var response = actionContext.Request.CreateErrorResponse(HttpStatusCode.BadRequest, "Something went wrong.");
- actionContext.Response = response;
- }
- builder.Register(c => new CheckFilter())
- .AsWebApiActionFilterFor<UtilsController>(c => c.GetErrorCodes())
- .InstancePerRequest();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement