users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] MessageTooLargeException: status 413

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Tue, 4 Dec 2012 17:00:52 +0000

I thought I would not worry about the related enhancement request being
rejected, but I'm changing my mind :-) - I'm still easy on it, but
sending this message to the list in case someone may also find an idea
of introducing an exception class representing HTTP 413 useful.

While I agree with Marek that we have to be careful about not
introducing an exception class for every possible HTTP status starting
from 300, I think MessageTooLargeException is the last missing exception
class which can actually be practically used.

Specifically, CXF reports 413 when the multipart body is too large, as
well in some other cases. I can imagine users of jersey and Resteasy
also finding it useful...

This can be added later on demand - but may be it is worth considering
doing it now, I'm easy either way

Sergey