[openstreetmap/openstreetmap-website] Get directions using fetch (PR #5642)

Tom Hughes notifications at github.com
Tue Feb 11 18:15:05 UTC 2025


@tomhughes commented on this pull request.



>              if (response.code !== "Ok") {
-              return callback(true);
+              throw new TypeError("Response " + response.code);

Was there a reason for using `TypeError` rather than a simple `Error` here? It doesn't really seem to fit the description of what a `TypeError` is?

Also given that nothing uses the description what's the purpose of including it? Just for easier debugging?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5642#pullrequestreview-2609607925
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5642/review/2609607925 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250211/5a27fe7b/attachment-0001.htm>


More information about the rails-dev mailing list