fix(map): handle missing MapTiler key - #192
Merged
AnayDhawan merged 1 commit intoSep 5, 2026
Merged
Conversation
Contributor
|
@AyobamiH is attempting to deploy a commit to the studentsuite Team on Vercel. A member of the Team first needs to authorize it. |
Member
|
Thanks for the PR. If StudyMap has been useful, a star on the repo helps more students find it. Appreciated either way. |
Member
|
Merged, thanks. Nice work: the Closes #147. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When
NEXT_PUBLIC_MAPTILER_KEYis missing or blank,MapViewstill mounts Leaflet with a tile URL ending in?key=. MapTiler rejects each tile request, but no React error is thrown. The existing error boundary therefore never replaces the gray, unusable map.Closes #147.
Reproduction
On current
main, withNEXT_PUBLIC_MAPTILER_KEYunset:/mapresponds successfully.?key=.Changes
Basemap unavailablestate when the key is missing or blank.SELF-HOSTING.md.Why this layer
This is handled in
MapView, notMapErrorBoundary, because failed HTTP tile requests do not throw a React rendering error. Stopping the map from mounting without its required configuration prevents the failing requests at their source.Verification
npm run lintnpx tsc --noEmitnpm run test:unit: 16 files and 129 tests passedenv -u NEXT_PUBLIC_MAPTILER_KEY npx next build: production build passed with 489 generated pages