mapbox / mapbox/mts-data-sync

Confusing results if email address (instead of username) given for --token

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

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
71
Forks
15
PR merge metrics
No merged PRs in 30d

Description

When I first ran --token I gave it my email address instead of my username.

This works enough to be confusing! Specifically, the tile source upload works (presumably the API is willing to accept an email instead of a username?), but then the geojson validation fails because "layers.my_layer_name.source does not belong to account 'myusername'.", because it had interpolated the given username into the name of the tile source in the recipe file.

Suggestion: Resolve the situation gracefully, either by somehow ascertaining the username from email, or simply by refusing to accept a username that contains a "@", or perhaps just detecting the mismatch and giving a more pointed error message?

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 at the --token argument handling and trace how the supplied value reaches tile source upload, the recipe file, and geojson validation. Compare the behavior for a username and an email address; done means the mismatch is handled consistently with a pointed result, as decided by the project maintainers.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
authentication, backend, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.