mapbox / mapbox/tilelive

Use error codes rather than checking message

Open
#42 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
540
Forks
106
PR merge metrics
No merged PRs in 30d

Description

Currently in tilelive and tilelive API-implementing modules an error with message `Tileset does not exist` (and relatedly, `Tile does not exist`, `Grid does not exist`) often get special treatment.

Look into adding a `code` attribute or so that makes checking for these errors less freaky.

Contributor guide

Open the contributing guide

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.

Research direction

Start by locating the error handling in tilelive and its API-implementing modules. Review how the listed “does not exist” messages are produced and checked, then determine the error-code contract needed across those modules. Done means callers can distinguish these errors by code rather than message text.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.