<p dir="auto">As discussed in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2770637460" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/5474" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/5474/hovercard?comment_id=2585349128&comment_type=issue_comment" href="https://github.com/openstreetmap/openstreetmap-website/pull/5474#issuecomment-2585349128">#5474 (comment)</a>, this PR adds an error handling in case the API request fails.</p>
<p dir="auto"><a href="https://github.com/user-attachments/assets/4d2d2e77-fcb5-43c4-a5ba-a4c3ffaa8b71">image.png (view on web)</a></p>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href='https://github.com/openstreetmap/openstreetmap-website/pull/5551'>https://github.com/openstreetmap/openstreetmap-website/pull/5551</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5551/commits/55d0bc8e5626e3881ab4f06b460ed4285138001c" class="commit-link">55d0bc8</a> Added error handling for data layer</li>
</ul>
<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5551/files">2 files</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5551/files#diff-ef1a25386d3acf1a86026dcc1edba5a3ec22fc64053d657cb1564b25129475c6">app/assets/javascripts/index/layers/data.js</a>
(23)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5551/files#diff-44438ce218f5287c58d0017f965d888715635d94280669896f75841fbd7b4cd7">config/locales/en.yml</a>
(1)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5551.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/5551.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5551.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/5551.diff</a></li>
</ul>
<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/5551">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLIEUEA3MXIACPE74DD2MK2I7AVCNFSM6AAAAABV2SKDCKVHI2DSMVQWIX3LMV43ASLTON2WKOZSHAYTANBVG42DENA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLKJYSMDOZUDC5AZ6MD2MK2I7A5CNFSM6AAAAABV2SKDCKWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHKPBBNKA.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/5551</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/5551",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5551",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>