mapbox / mapbox/mapbox-gl-js

Add an error message for calling "GeoJSONSource#setData" for a style that doesn't exist

Open
#2,602 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature :green_apple: good first issue
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

Can this error message be improved?

(link removed)

Step 1) press the [+] button
Step 2) Notice the specific error message

dispatcher.js:32 Uncaught TypeError: Cannot read property 'send' of undefined

The dispatcher.js:32 that doesn't give any hints whatsoever for me and probably other api users.

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 with GeoJSONSource#setData and trace the failure reported at dispatcher.js:32 when the style does not exist. Reproduce the two-step case, then make the resulting error identify the invalid operation or missing style instead of reporting that send is undefined.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.