Return-Path: X-Original-To: apmail-chemistry-dev-archive@www.apache.org Delivered-To: apmail-chemistry-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 059C999A1 for ; Thu, 27 Oct 2011 10:13:33 +0000 (UTC) Received: (qmail 28539 invoked by uid 500); 27 Oct 2011 10:13:32 -0000 Delivered-To: apmail-chemistry-dev-archive@chemistry.apache.org Received: (qmail 28375 invoked by uid 500); 27 Oct 2011 10:13:21 -0000 Mailing-List: contact dev-help@chemistry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@chemistry.apache.org Delivered-To: mailing list dev@chemistry.apache.org Received: (qmail 28358 invoked by uid 99); 27 Oct 2011 10:13:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Oct 2011 10:13:18 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of fguillaume@nuxeo.com designates 74.125.82.170 as permitted sender) Received: from [74.125.82.170] (HELO mail-wy0-f170.google.com) (74.125.82.170) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Oct 2011 10:13:14 +0000 Received: by wyf23 with SMTP id 23so5952426wyf.1 for ; Thu, 27 Oct 2011 03:12:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.134.194 with SMTP id s44mr1110477wei.12.1319710372163; Thu, 27 Oct 2011 03:12:52 -0700 (PDT) Received: by 10.216.19.80 with HTTP; Thu, 27 Oct 2011 03:12:52 -0700 (PDT) In-Reply-To: <4EA70008.2050602@alfresco.com> References: <4EA70008.2050602@alfresco.com> Date: Thu, 27 Oct 2011 12:12:52 +0200 Message-ID: Subject: Re: exception on get of missing type From: Florent Guillaume To: =?ISO-8859-1?Q?Florian_M=FCller?= Cc: dev@chemistry.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Ok I see what you mean and I agree, we'll change our code to throw CmisObjectNotFoundException. Nevertheless I think the TCK should be more lenient (the spec does not mandate which exception should be thrown), so I'll also change it. Florent On Tue, Oct 25, 2011 at 8:29 PM, Florian M=FCller wrote: > Hi Florent, > > I think a CmisObjectNotFoundException is more appropriate than a > CmisInvalidArgumentException. The object, in this case the type, is not > found. The client did not provide an invalid value like a wrong enum > value or a value out of range. > > In HTTP terms, it's rather a 404 than a 400. > > > - Florian > > > > On 25/10/2011 07:23, Florent Guillaume wrote: >> Hi, >> >> In my repository, o.a.c.o.client.api.Session.getTypeDefinition throws >> a =A0when you pass it an unknown type >> (cmis:policy in my case). However the TCK >> (AbstractSessionTest.hasPolicies in my case, but there are other >> places) expects a CmisObjectNotFoundException. >> >> I think that should be a legit exception for this case, but I'm open >> to arguments why not. If you think it's ok, I can change the TCK (and >> document the exceptions on the interface). >> >> Florent >> > > --=20 Florent Guillaume, Director of R&D, Nuxeo Open Source, Java EE based, Enterprise Content Management (ECM) http://www.nuxeo.com=A0=A0 http://www.nuxeo.org=A0=A0 +33 1 40 33 79 87