<p dir="auto">The <code class="notranslate">bbox</code> parameter is not always required when it can be used (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1877543815" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/4214" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/4214/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/4214">#4214</a>, api changesets query). But the error message inside BoundingBox reads that it is: "The parameter bbox is required, and must be of the form min_lon,min_lat,max_lon,max_lat".</p>
<p dir="auto">We can check if <code class="notranslate">bbox</code> is present before calling a bbox constructor, and write a different error message when necessary.</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/4221'>https://github.com/openstreetmap/openstreetmap-website/pull/4221</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/4221/commits/947bd9eec91f913f67f142055f0dcac1aa9b7700" class="commit-link">947bd9e</a> Check required bbox parameter presence outside of BoundingBox class</li>
</ul>
<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4221/files">8 files</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4221/files#diff-f4bef52c778c76f37c4a73b771f95886ce4c0b65e962ecc93eb76df54e6844bf">app/controllers/api/map_controller.rb</a>
(1)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4221/files#diff-6e9fe051c0ef757618e376ffe731dfca8d4960ef0838b7d6a05609b46ba0fad1">app/controllers/api/notes_controller.rb</a>
(9)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4221/files#diff-19869328a2527e48402e7511953ee1aff338d652f6e8b4c40a8f4c684250ba28">app/controllers/api/tracepoints_controller.rb</a>
(1)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4221/files#diff-f1c4bd478fb88f3831057ae6c14aa753db1eaf67219f6704f5dabc39552a0bd9">lib/bounding_box.rb</a>
(2)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4221/files#diff-f59c9f25dc71ba35c86587a7ab9acd97518ce640d83872c9d8899adaa97b9719">test/controllers/api/map_controller_test.rb</a>
(4)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4221/files#diff-b4cc80ae5a4279eef2a7494cb8c489220ce03acaf36932b2042247df9d316908">test/controllers/api/notes_controller_test.rb</a>
(4)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4221/files#diff-30954d8c494a3bce049294a61e9fbcee76e016eb0ba2ba26cf22ec3da388d6fb">test/controllers/api/tracepoints_controller_test.rb</a>
(4)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4221/files#diff-01e538a73fdc73d111fbb16467deb2763c0da837f141b4b25509dd181d32135a">test/lib/bounding_box_test.rb</a>
(2)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/4221.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/4221.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/4221.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/4221.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/4221">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLITOKLK77A7IGN7HC3XYQRTLANCNFSM6AAAAAA4JDPVUU">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLPLCYVCTUCLBMMO4NTXYQRTLA5CNFSM6AAAAAA4JDPVUWWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHG77VWFI.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/4221</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/4221",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/4221",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>