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

chore: provide more fine-grained websocket close code on errors #44

Merged
merged 5 commits into from
Aug 10, 2023

Conversation

phantumcode
Copy link
Member

Issue #, if available:

Description of changes:

  • update web socket close to include liveness-specific close code
  • update timeout logic start the timeout timer when the oval is initially displayed to handle edge case when a face is detected and the oval is displayed and the user moves away immediately

Check points: (check or cross out if not relevant)

  • Added new tests to cover change, if needed
  • Build succeeds with all target using Swift Package Manager
  • All unit tests pass
  • Security oriented best practices and standards are followed (e.g. using input sanitization, principle of least privilege, etc)
  • Documentation update for the change if required
  • PR title conforms to conventional commit style
  • If breaking change, documentation/changelog update with migration instructions

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@phantumcode phantumcode requested review from a team as code owners August 9, 2023 19:34
Copy link
Member

@atierian atierian left a comment

Choose a reason for hiding this comment

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

Recommend using a stored property for the closeCode rather than computed to avoid the switch and nil coelescing operators. Approving as is though, lmk if you want to make that change and need a new approval.

@phantumcode phantumcode merged commit ce74064 into main Aug 10, 2023
1 check passed
@phantumcode phantumcode deleted the phantum/improve_closure_code branch August 10, 2023 17:56
phantumcode added a commit that referenced this pull request Aug 31, 2023
* main:
  chore: update face fit instruction text and error message (#49)
  chore: refactor session fit timeout from backend service (#46)
  chore: provide more fine-grained websocket close code on errors (#44)
devedup pushed a commit to devedup/amplify-ui-swift-liveness that referenced this pull request Sep 12, 2023
…amplify#44)

* chore: improve websocket close code

* chore: update web socket close code

* chore: update unit test

* chore: move websocket close code to liveness error

* chore: code cleanup
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