<p>Well, having machine readable error codes isn't a concept that is widely available in the API as of today. This leads to all sorts of regular expression based error message parsing, going back to even Potlatch2: <a href="https://github.com/openstreetmap/potlatch2/blob/master/net/systemeD/halcyon/connection/XMLConnection.as#L330-L364">https://github.com/openstreetmap/potlatch2/blob/master/net/systemeD/halcyon/connection/XMLConnection.as#L330-L364</a></p>
<p>I certainly wouldn't object putting in some more accessible error code in the "Error" HTTP header, and have the localized text in the body for the UI to show in a popup. After all, JOSM just needs the Error header to reliably recognize a "User has been blocked" situation.</p>
<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=AAK2OLKF3CUIUPH2KL3WKVDPWEAL3A5CNFSM4HN2YVOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVW4WWY#issuecomment-493734747">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLKEWXLTZW3LVAESIMLPWEAL3ANCNFSM4HN2YVOA">mute the thread</a>.<img src="https://github.com/notifications/beacon/AAK2OLMTTXFYTTO7CXDT4YTPWEAL3A5CNFSM4HN2YVOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVW4WWY.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=AAK2OLKF3CUIUPH2KL3WKVDPWEAL3A5CNFSM4HN2YVOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVW4WWY#issuecomment-493734747",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/2227?email_source=notifications\u0026email_token=AAK2OLKF3CUIUPH2KL3WKVDPWEAL3A5CNFSM4HN2YVOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVW4WWY#issuecomment-493734747",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>