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

No devices assigned to tags #61

@Sideral-Inc

Description

@Sideral-Inc

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions