Return-Path: Delivered-To: apmail-incubator-abdera-dev-archive@locus.apache.org Received: (qmail 71915 invoked from network); 17 Feb 2008 15:56:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Feb 2008 15:56:21 -0000 Received: (qmail 63141 invoked by uid 500); 17 Feb 2008 15:56:15 -0000 Delivered-To: apmail-incubator-abdera-dev-archive@incubator.apache.org Received: (qmail 63046 invoked by uid 500); 17 Feb 2008 15:56:15 -0000 Mailing-List: contact abdera-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: abdera-dev@incubator.apache.org Delivered-To: mailing list abdera-dev@incubator.apache.org Received: (qmail 63035 invoked by uid 99); 17 Feb 2008 15:56:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Feb 2008 07:56:15 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_HELO_PASS,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [12.130.29.202] (HELO eero.baz.org) (12.130.29.202) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Feb 2008 15:55:42 +0000 Received: by eero.baz.org (Postfix, from userid 1017) id 84AB489A00; Sun, 17 Feb 2008 10:55:49 -0500 (EST) Received: from [192.168.1.3] (pool-72-93-81-62.bstnma.fios.verizon.net [72.93.81.62]) by eero (tmda-ofmipd) with ESMTP; Sun, 17 Feb 2008 10:55:47 -0500 Message-ID: <47B858EF.6010007@wso2.com> Date: Sun, 17 Feb 2008 10:55:27 -0500 User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: abdera-dev@incubator.apache.org Subject: UnknownTarget and error codes Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Glen Daniels X-Virus-Checked: Checked by ClamAV on apache.org Hi Abdera-devs! I'm building something based off the AbstractEntityCollectionProvider, so I've got my custom TargetResolver looking through the backend data store to figure out the correct type of thing for the requested URI. I can't just use a standard pattern/route here because I support hierarchical collections of arbitrary names, so in one case "foo/bar" might be an entry and in another it might be a collection. So essentially I look up the given path in my backend, and if I don't find it I return null from resolve(). Can anyone explain to me the rationale behind returning an "unknown method" error when a null target is returned from a TargetResolver? It would seem to my Abdera-beginner's eye that a 404 would be much more natural here. Right now in order to get a 404 I have to do something like a) notice that the requested thing doesn't exist in the TargetResolver, but return a valid Target anyway after setting some property in the context - then b) check for that property in my overriden getEntry() method and throw a 404 there. Thanks, --Glen