AbpApiExceptionFilterAttribute - A value is required but was not present in the request

1.5k Views Asked by At

I have a webapi controller like below:

[ResponseType(typeof(SampleDto))]
public IHttpActionResult GetSample(string name, string guid)

and the request take name and guid as query string like: http://www.example.com/api/Controller1/GetSample?name=james&guid=

the guid is empty.

When I issue the request, there is an Error:

WARN  2018-09-29 07:04:21,361 [18   ] nHandling.AbpApiExceptionFilterAttribute - Method arguments are not valid! See ValidationErrors for details.
Abp.Runtime.Validation.AbpValidationException: Method arguments are not valid! See ValidationErrors for details.
WARN  2018-09-29 07:04:21,361 [18   ] nHandling.AbpApiExceptionFilterAttribute - There are 2 validation errors:
WARN  2018-09-29 07:04:21,361 [18   ] nHandling.AbpApiExceptionFilterAttribute - A value is required but was not present in the request. (guid.String)
WARN  2018-09-29 07:04:21,361 [18   ] nHandling.AbpApiExceptionFilterAttribute - A value is required but was not present in the request. (guid.String)

Where can I change the validation rule?

0

There are 0 best solutions below