[openstreetmap/openstreetmap-website] Check required bbox parameter presence outside of BoundingBox class (PR #4221)
Anton Khorev
notifications at github.com
Sun Sep 3 06:46:13 UTC 2023
The `bbox` parameter is not always required when it can be used (#4214, 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".
We can check if `bbox` is present before calling a bbox constructor, and write a different error message when necessary.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/4221
-- Commit Summary --
* Check required bbox parameter presence outside of BoundingBox class
-- File Changes --
M app/controllers/api/map_controller.rb (1)
M app/controllers/api/notes_controller.rb (9)
M app/controllers/api/tracepoints_controller.rb (1)
M lib/bounding_box.rb (2)
M test/controllers/api/map_controller_test.rb (4)
M test/controllers/api/notes_controller_test.rb (4)
M test/controllers/api/tracepoints_controller_test.rb (4)
M test/lib/bounding_box_test.rb (2)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/4221.patch
https://github.com/openstreetmap/openstreetmap-website/pull/4221.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4221
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4221 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20230902/eac7ec4f/attachment.htm>
More information about the rails-dev
mailing list