Skip to content

Fix device page 500#5516

Merged
mitchellhenke merged 2 commits intomainfrom
mitchellhenke/fix-device-page-500
Oct 18, 2021
Merged

Fix device page 500#5516
mitchellhenke merged 2 commits intomainfrom
mitchellhenke/fix-device-page-500

Conversation

@mitchellhenke
Copy link
Contributor

Related to #5491

It is possible we don't get a platform version, and it was leading to 500s: NR Link

This PR adds some checks around not attempting to split on nil

Copy link
Contributor

@aduth aduth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

'account.index.device',
browser: "#{browser.name} #{browser.version}",
os: "#{browser.platform.name} #{browser.platform.version.split('.').first}",
os: os,
Copy link
Contributor

@aduth aduth Oct 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we do something like... ?

Suggested change
os: os,
os: [browser.platform.name, browser.platform.version&.split('.')&.first].compact.join(' '),

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would need the null-safe navigator, but otherwise yep

Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think technically these logic changes were from https://github.com/18F/identity-idp/pull/5489/files#diff-c9f51ebbfd2551776f99b17769a06e6a6ae22a090d8311551a1a922b7cb36eb8, but otherwise same same, good catch! Thanks for the good test case

@mitchellhenke mitchellhenke merged commit 8f54ba2 into main Oct 18, 2021
@mitchellhenke mitchellhenke deleted the mitchellhenke/fix-device-page-500 branch October 18, 2021 19:47
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.

3 participants