Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Expose machine-readable cause of error in callback result

Open
#15 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
cpp, node.js
Domain
api, backend

Research direction

Start with src/tsp_worker.h and the SetErrorMessage usage linked in the issue, then inspect HandleErrorCallback in the asynchronous TSP and VRP workers. Confirm how NAN creates the JavaScript Error and make the callback expose both a machine-readable code and the existing message for each worker's error path.

Written by the indexing model from the issue text.

Description

In case of an error in the bindings we use SetErrorMessage in both the TSP and VRP worker to let NAN generate an Js Error for us. What we should add is not only a message but also a parse-able code, think:

{code: 'Timeout', message: 'Unable to find a solution, solver timed out'}

Implementation: in the async. workers override

void HandleErrorCallback()

and generate a Js Error object.

Dominant language
C++
Stars
155
Forks
47
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mapbox/node-or-tools

All issues in mapbox/node-or-tools

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.