MCPcopy
hub / github.com/cpaczek/skylight / geoErrorMessage

Function geoErrorMessage

web/src/lib/geolocation.ts:45–56  ·  view source on GitHub ↗
(code: number, insecure: boolean)

Source from the content-addressed store, hash-verified

43}
44
45export function geoErrorMessage(code: number, insecure: boolean): string {
46 if (code === PERMISSION_DENIED && insecure) {
47 return GEO_INSECURE_CONTEXT_MESSAGE;
48 }
49 if (code === PERMISSION_DENIED) {
50 return "Location permission denied";
51 }
52 if (code === TIMEOUT) {
53 return "Location request timed out";
54 }
55 return "Location unavailable";
56}

Callers 2

useCurrentLocationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected