Skip to content

Send Selfie Errors from BE to FE#9941

Merged
charleyf merged 32 commits intomainfrom
charley/lg-12157-send-selfie-fail-info-to-fe
Jan 24, 2024
Merged

Send Selfie Errors from BE to FE#9941
charleyf merged 32 commits intomainfrom
charley/lg-12157-send-selfie-fail-info-to-fe

Conversation

@charleyf
Copy link
Contributor

@charleyf charleyf commented Jan 18, 2024

🎫 Ticket

https://cm-jira.usa.gov/browse/LG-12157

🛠 Summary of changes

This ticket sends selfie errors from the BE to the FE for display to the user. It's required setup work for the FE ticket LG-11893.

To do that it does two things:

  1. Adds the selfie errors to the errors[] array. This is so we can show different errors if we want to in the future.
  2. Adds two new properties selfie_live and selfie_quality_good that are sent to the FE. This is so we can show the appropriate text on the review issues step.

📜 Testing Plan

I don't have a great testing plan, but checking that the logs show these values being sent to the FE is the core of testing this. For a dev, that would probably mean running make watch_events then uploading a failing selfie yaml file and looking for selfie_live and selfie_quality_good in the logs.

@charleyf charleyf changed the title Refactor in preparation for allowing more errors Send Selfie Errors from BE to FE Jan 18, 2024
@charleyf charleyf marked this pull request as ready for review January 22, 2024 15:38
@charleyf charleyf requested a review from dawei-nava January 22, 2024 15:39
def selfie_live?
portait_error = get_portrait_error(portrait_match_results)
return true if portait_error.nil? || portait_error.empty?
return error_is_not_live(portait_error)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit, redundant return, and there are few methods down there too.

Copy link
Contributor

@dawei-nava dawei-nava left a comment

Choose a reason for hiding this comment

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

LGTM. Left some minor comments.

@charleyf charleyf merged commit 0ca7d19 into main Jan 24, 2024
@charleyf charleyf deleted the charley/lg-12157-send-selfie-fail-info-to-fe branch January 24, 2024 21:13
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