[openstreetmap/openstreetmap-website] Get directions using fetch (PR #5642)
Marwin Hochfelsner
notifications at github.com
Tue Feb 11 19:29:49 UTC 2025
@hlfan commented on this pull request.
> if (response.code !== "Ok") {
- return callback(true);
+ throw new TypeError("Response " + response.code);
I just want to return from the function and reject the promise in one go. What I throw matters more to eslint than to me. But I thought I'd be nice for the good of the codebase.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5642#discussion_r1951473595
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5642/review/2609819180 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250211/1f1d0a42/attachment.htm>
More information about the rails-dev
mailing list