[openstreetmap/openstreetmap-website] Upgrade to rails 7.1.0 (PR #4278)

Andy Allan notifications at github.com
Thu Oct 12 08:58:17 UTC 2023


@gravitystorm commented on this pull request.



> @@ -138,7 +138,7 @@ def test_create_invalid_xml
       xml = "<osm><node lat='#{lat}' lon='#{lon}' changeset='#{changeset.id}'><tag k='foo' v='#{'x' * 256}'/></node></osm>"
       put node_create_path, :params => xml, :headers => auth_header
       assert_response :bad_request, "node upload did not return bad_request status"
-      assert_equal ["NodeTag ", " v: is too long (maximum is 255 characters) (\"#{'x' * 256}\")"], @response.body.split(/[0-9]+,foo:/)

I know that some clients do parse the free-text error responses (see e.g. https://github.com/openstreetmap/openstreetmap-website/issues/2227 inter alia). 

But perhaps for this particular error it's very unlikely that clients would be running into it (other than during development) since it's very likely that adding the length limit would happen client-side. It's a different situation for other messages, like when an editing conflict happens (e.g. version mismatch) which you can't handle 100% client side.

So I think it's worth us being aware that this is technically a breaking change, but we don't expect (m?)any people to notice, and if there is a problem we'll need to build some method to fully control the errors in future (i.e. not rely on rails generated error messages since these can change between versions).

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4278#discussion_r1356509890
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/4278/review/1673653942 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20231012/3fc1788d/attachment.htm>


More information about the rails-dev mailing list