You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@abdera.apache.org by Sergio Bossa <se...@gmail.com> on 2008/07/12 18:30:01 UTC

Improve Abdera user feedback on error conditions

Hi guys,

given my current experience in leading a small team made up of
developers working for the first time with Abdera, I have some
thoughts about Abdera error handling: more specifically, I think that
Abdera error handling code should provide better user feedback.

Let me give two practical examples.

As a first example, if users POST to an Abdera server an Atom entry
document *without* specifying the application/atom+xml content type,
they get an hard-to-understand UnsupportedOperationException by the
log side, and an even harder-to-understand server error (500) by the
response side.
As a second example, if users POST to an Abdera server an Atom entry
document *without* specifying its id, they simply get an empty
response: here, understanding is even harder than the first example,
even if the error is very simple.
Given the lack of true user-oriented feedback, troubleshooting
requires to go deep into the code and/or debug it: too much IMHO for
first-time users, who get discouraged.

So, I think that Abdera should improve both error gathering and error
feedback capabilities.
What do you think about that?
I have some ideas about how to do that, and I'd be more that happy to
share and eventually work on them.
Let me know.

Cheers,

Sergio B.

-- 
Sergio Bossa
Software Passionate, Java Technologies Specialist and Open Source Enthusiast.
Blog : http://sbtourist.blogspot.com
Sourcesense - making sense of Open Source : http://www.sourcesense.com
Pro-netics s.p.a. : http://www.pronetics.it

Re: Improve Abdera user feedback on error conditions

Posted by Sergio Bossa <se...@gmail.com>.
On Sat, Jul 12, 2008 at 11:25 PM, David Primmer <da...@gmail.com> wrote:

> I haven't looked too far for prior art in this area but the youtube
> api does have an approach to formatting error response bodies:
> [CUT]

I was thinking at something similar for the error reporting part: we
could use custom namespaced elements for reporting errors to clients,
the same way as YouTube does.
However, I think the most important changes have to be made to the
Abdera server implementation, in order to properly gather error
conditions. For example, the whole Atom validation stuff, currently
performed by the ProviderHelper class, could be refactored (where
"refactoring" here is somewhat improperly used, but you get the idea)
in order to be performed by a specific "Validator" class, which would
better handle error conditions.
There would probably be several refactorings/modifications, so I'd
like to know if you, guys, are interested in such an issue.

Thanks,
Cheers,

Sergio B.

-- 
Sergio Bossa
Software Passionate, Java Technologies Specialist and Open Source Enthusiast.
Blog : http://sbtourist.blogspot.com
Sourcesense - making sense of Open Source : http://www.sourcesense.com
Pro-netics s.p.a. : http://www.pronetics.it

Re: Improve Abdera user feedback on error conditions

Posted by David Primmer <da...@gmail.com>.
I haven't looked too far for prior art in this area but the youtube
api does have an approach to formatting error response bodies:

http://code.google.com/apis/youtube/developers_guide_protocol.html#Error_responses

An invalid_format Error - This code indicates that an XML element's
value does not match an expected format. For example, you could
receive this error if you specify invalid coordinates in the <gml:pos>
tag.

<?xml version='1.0' encoding='UTF-8'?>
<errors>
  <error>
    <domain>yt:validation</domain>
    <code>invalid_format</code>
    <location type='xpath'>georss:where/gml:point/gml:pos/text()</location>
  </error>
</errors>

There is one issue, I think with the domain element, as in this
example, it's specific to google data services and not global, but you
get the basic idea.

davep

On Sat, Jul 12, 2008 at 11:06 AM, Sergio Bossa <se...@gmail.com> wrote:
> Just to be clear: when I say "user feedback", I mean both feedback
> provided to users acting as clients of an Abdera server, and also
> feedback provided to users implementing an Abdera server.
>
> Cheers,
>
> Sergio B.
>
> --
> Sergio Bossa
> Software Passionate, Java Technologies Specialist and Open Source Enthusiast.
> Blog : http://sbtourist.blogspot.com
> Sourcesense - making sense of Open Source : http://www.sourcesense.com
> Pro-netics s.p.a. : http://www.pronetics.it
>

Re: Improve Abdera user feedback on error conditions

Posted by Sergio Bossa <se...@gmail.com>.
Just to be clear: when I say "user feedback", I mean both feedback
provided to users acting as clients of an Abdera server, and also
feedback provided to users implementing an Abdera server.

Cheers,

Sergio B.

-- 
Sergio Bossa
Software Passionate, Java Technologies Specialist and Open Source Enthusiast.
Blog : http://sbtourist.blogspot.com
Sourcesense - making sense of Open Source : http://www.sourcesense.com
Pro-netics s.p.a. : http://www.pronetics.it