Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error out earlier if no allowedServices. #313

Open
g-ortuno opened this issue Oct 12, 2016 · 5 comments

Comments

@g-ortuno
Copy link
Contributor

commented Oct 12, 2016

A developer was using a namePrefix filter and forgot the optionalServices field, which resulted in getPrimaryServices rejecting with NotFoundError. I'm adding a check for allowedUuids before querying for services in the implementation. Is this something we should include in the getPrimaryService(s) algorithms?

@beaufortfrancois

This comment has been minimized.

@shawt

This comment has been minimized.

Copy link

commented Oct 12, 2016

Yes. Sorry. I thought they were two different forms.

Trevor

On Wed, Oct 12, 2016 at 9:45 AM, François Beaufort <notifications@github.com

wrote:

Is it the same as https://chromium.googlesource.com/chromium/src/+/
b325b3a86985fc17904c82f712acf41b6a96defb%5E%21/#F10?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#313 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAN4cZjOSedAzlD3JC1-oS1JqlzN8kIdks5qzORngaJpZM4KUXOs
.


Trevor Shaw
Director of Technology
Dwight-Englewood School
315 E. Palisade Ave
Englewood, NJ 07631
"Challenging Minds for a Changing World"
v 201.227.3178


@g-ortuno

This comment has been minimized.

Copy link
Contributor Author

commented Oct 12, 2016

That error shows up only if you call getPrimaryService(s) with a UUID. If you call getPrimaryServices() and you haven't requested access to any services then you just get DOMException: No Services found in device.

@beaufortfrancois

This comment has been minimized.

Copy link
Member

commented Oct 14, 2016

Oh you're right! This would be nice to add this. Did you already file a bug for this?

@g-ortuno

This comment has been minimized.

Copy link
Contributor Author

commented Oct 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.