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

Track verified updates #126

Merged
merged 5 commits into from
Sep 19, 2023
Merged

Track verified updates #126

merged 5 commits into from
Sep 19, 2023

Conversation

nickpatrick
Copy link
Contributor

No description provided.

} else if (error === 'ERROR_LOCATION') {
return reject(new RadarLocationError('Could not determine location.'));
} else if (error === 'ERROR_NETWORK') {
return reject(new RadarTimeoutError());
Copy link
Contributor Author

@nickpatrick nickpatrick Sep 19, 2023

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)

Copy link
Collaborator

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');
Copy link
Contributor Author

@nickpatrick nickpatrick Sep 19, 2023

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()

kochis
kochis previously approved these changes Sep 19, 2023
@nickpatrick nickpatrick merged commit 0c2cf27 into master Sep 19, 2023
2 checks passed
@nickpatrick nickpatrick deleted the track-verified-updates branch September 19, 2023 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants