On Nov 23, 2012, at 10:26 AM, Marek Potociar <marek.potociar_at_oracle.com> wrote:
>
> On Nov 23, 2012, at 3:58 PM, Sergey Beryozkin <sberyozkin_at_talend.com> wrote:
>
>> On 23/11/12 14:53, Marek Potociar wrote:
>>>
>>> On Nov 21, 2012, at 11:51 PM, Sergey Beryozkin<sberyozkin_at_talend.com> wrote:
>>>
>>>> On 21/11/12 15:00, Marek Potociar wrote:
>>>>> I just re-introduced the classes we had. ValidationException and ValidationError. I'm however fine revisiting this.
>>>>
>>>> I'd like to propose dropping ValidationException or at least consider it extending InternalServerErrorException.
>>>> I prefer the former option - I'm not sure we should make it easy for the list of validation errors exposing some the info about the resource class/method available to the client - it is 400 or 401 as far as the client is concerned given that some of the request properties have failed the validation? Actually, if it were to stay - it should extend one of ClientErrorExceptions ?
>>>
>>> Validation failure on server can be both, client error (request data) and server error (response data). So the extending just Client or Server base exception would not make sense. Also, some client-side validation issues should clearly be treated as 404 and not 400 (e.g. validation failure caused by invalid URI-based information (path, query, matrix param) IMO.
>>>
>>
>> Makes sense but this confirms we can not use ValidationException to cover all the cases - perhaps the spec can recommend what HTTP error statuses are to be reported in specific validation failure cases ?
>
> Yes, that's something I had in mind too.
OK, I will take another look a this. I don't believe we had the specialized WAE hierarchy at the time we introduced ValidationException.
-- Santiago