<p>While we're at it, this stuff would have to be rendered via some builder, rather than resorting to some piecemeal XML building approach. This way, it will also be easier to provide JSON response error message (which I'm sure will be the next thing to come up).</p>
<pre><code>      result = OSM::API.new.get_xml_doc
      result.root.name = "osmError"
      result.root << (XML::Node.new("status") << "#{Rack::Utils.status_code(status)} #{Rack::Utils::HTTP_STATUS_CODES[status]}")
      result.root << (XML::Node.new("message") << message)

render :xml => result.to_s
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/2227?email_source=notifications&email_token=AAK2OLL75Q372P5GTTMRRRTPWERQTA5CNFSM4HN2YVOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVW67JI#issuecomment-493744037">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLI75FMC54CSBSQNI2DPWERQTANCNFSM4HN2YVOA">mute the thread</a>.<img src="https://github.com/notifications/beacon/AAK2OLIMRRHVRXACAEX47UDPWERQTA5CNFSM4HN2YVOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVW67JI.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/issues/2227?email_source=notifications\u0026email_token=AAK2OLL75Q372P5GTTMRRRTPWERQTA5CNFSM4HN2YVOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVW67JI#issuecomment-493744037",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/2227?email_source=notifications\u0026email_token=AAK2OLL75Q372P5GTTMRRRTPWERQTA5CNFSM4HN2YVOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVW67JI#issuecomment-493744037",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>