@hlfan commented on this pull request.
> @@ -277,7 +278,19 @@ L.OSM.Map = L.Map.extend({
headers: { accept: "application/json" },
signal: this._objectLoader.signal
})
- .then(response => response.json())
+ .then(async response => {
+ if (response.ok) {
+ return response.json();
+ }
+
+ const status = response.statusText || response.status;
+ if (response.status !== 400 && response.status !== 509) {
To ignore deleted element response errors:
```suggestion
if (![400, 410, 509].includes(response.status)) {
```
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6353#pullrequestreview-3162849864
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/pull/6353/review/[email protected]>_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev