<p></p>
<p><b>@gravitystorm</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4278#discussion_r1356509890">test/controllers/api/nodes_controller_test.rb</a>:</p>
<pre style='color:#555'>> @@ -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:/)
</pre>
<p dir="auto">I know that some clients do parse the free-text error responses (see e.g. <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="445738921" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/2227" data-hovercard-type="issue" data-hovercard-url="/openstreetmap/openstreetmap-website/issues/2227/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/issues/2227">#2227</a> inter alia).</p>
<p dir="auto">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.</p>
<p dir="auto">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).</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4278#discussion_r1356509890">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLKTGHSNS4ZQYKLNVU3X66WKTANCNFSM6AAAAAA5XRWRQY">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLLTYFX2Q6YFZJBRNB3X66WKTA5CNFSM6AAAAAA5XRWRQ2WGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTTDYHXLM.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/4278/review/1673653942</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/4278#discussion_r1356509890",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/4278#discussion_r1356509890",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>