-
Notifications
You must be signed in to change notification settings - Fork 11
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
Track verified updates #126
Conversation
} else if (error === 'ERROR_LOCATION') { | ||
return reject(new RadarLocationError('Could not determine location.')); | ||
} else if (error === 'ERROR_NETWORK') { | ||
return reject(new RadarTimeoutError()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kochis We might want to update this to RadarNetworkError
to match other SDKs (and be inclusive of network errors other than timeouts) in future web SDK versions, but since it's a breaking change we can punt for now.
Desktop app will return { meta: { error: 'ERROR_PERMISSIONS' | 'ERROR_LOCATION' | 'ERROR_NETWORK' } }
from localhost
GET /verify
calls (no good HTTP status code equivalents)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I forget why it's a timeout erorr, but makes sense to be more generic.
@@ -43,11 +43,14 @@ class VerifyAPI { | |||
encrypted, | |||
}; | |||
|
|||
let userAgent = navigator.userAgent; | |||
const windows = userAgent && userAgent.toLowerCase().includes('windows'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In #121 we were doing more complicated user agent checks, but now we just need to distinguish between Windows and Mac. No need to touch trackOnce()
codepath, only trackVerified()
No description provided.