[openstreetmap/openstreetmap-website] Forcing English language error response for /api/0.6/user/details (#2227)
mmd
notifications at github.com
Sun May 19 10:10:17 UTC 2019
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).
```
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
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/2227#issuecomment-493744037
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20190519/5725c8be/attachment.html>
More information about the rails-dev
mailing list