Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

No devices assigned to tags #61

Open
Sideral-Inc opened this issue Sep 1, 2020 · 0 comments
Open

No devices assigned to tags #61

Sideral-Inc opened this issue Sep 1, 2020 · 0 comments

Comments

@Sideral-Inc
Copy link

Hi,

Currently testing this library and figured out that if you specify a zone with a tag that doesn't exist in the cloud, it will generate an error:

RNEP.locationPermission.request().then((permission) => {
	if(permission !== RNEP.locationPermission.DENIED) {
		const credentials = new RNEP.CloudCredentials(***, ***);
		const initializeOptions = {
			notification: {
				title: "Exploration mode is on",
				text: "We'll notify you when you're next to something interesting.",
				channel: {
					id: "exploration-mode",
					name: "Exploration Mode"
				}
			}
		};

		RNEP.proximityObserver.initialize(credentials, initializeOptions);
		RNEP.proximityObserver.startObservingZones(proximityZones);
	}
}, (error) => {
	console.error("Error when trying to obtain location permission", error);
});

And got the following:

Proximity Observer error: Error Domain=EPXProximityObserverErrorDomain Code=1 "Fetching tags from Cloud failed." UserInfo={NSUnderlyingError=0x2804e74d0 {Error Domain=EstimoteProximitySDK.PersistentTagsRepository.Error Code=0 "No devices assigned to tags: ["tag1", "tag1", "tag1"]. Please double check in Cloud you have properly tagged your devices."}, NSLocalizedDescription=Fetching tags from Cloud failed., NSLocalizedRecoverySuggestion=Make sure your cloud credentials are correct and you have a valid internet connection. See CloudCredentials for more.}

Would it be possible to return an error message instead of throwing an error that blocks the app for this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant