Hello!

>From the documentation (see 
>http://cxf.apache.org/docs/jax-rs-multiparts.html#JAX-RSMultiparts-MultipartannotationandOptionalattachments)someone
> should receive a 400 status if a multipart is missing.

However I receive a 500 status. I looked into the source and think that in the 
class
org.apache.cxf.jaxrs.utils.multipart.AttachmentUtils
function
                getMultipart()
throws a
                throw new WebApplicationException(
                          new MultipartReadException(id.value(), id.type(), 
errorMsg.toString()));

which results in a 500 status code.

Used version is
        <cxfversion>2.6.0</cxfversion>

Is the documentation right or the code? I would like to give a 400er back to 
the client. In that case I should mark all parameters as not required and than 
check against null and return 400 if any parameter is null. Or do you think 
500er is just fine?

Kind regards,
Christian LIPP

Reply via email to