[OSM-dev] Internal server error on relation member without role
Tom Hughes
tom at compton.nu
Mon Nov 17 23:54:04 GMT 2008
Hugh Barnes wrote:
> On Tuesday 18 November 2008, 05:42:18, Shaun McDonald did write:
>> Due to the way that the XML parsing is done, if no role attribute is
>> supplied in the xml, then it will fail. Supplying role="" is what you
>> are required to do.
>
> Sorry - I'm just curious. Is this in OSM code or are you making a generic
> statement? If the former, it's a bug (if we're having to work around it) or
> it's just an unintuitive content model. If the latter, it doesn't ring true
> for any parsing I've done elsewhere.
I don't think I denied that it was a bug did I?
It's actually more complicated than that, though if the exception is
caused by malformed XML being sent that I agree that the API should
validate it better and report an error.
There are other cases that cause 500s though, so as running out of
memory - you can usually tell that case because it won't repeat if you
retry the request.
The other case is where the code is correct, but assumes that the
database is consistent, which is sometimes isn't at the moment for
historical reasons and because of a lack of transactional updates.
Tom
--
Tom Hughes (tom at compton.nu)
http://www.compton.nu/
More information about the dev
mailing list