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

Don't enforce validation on paper-channel LPAs #199

Merged
merged 1 commit into from
May 10, 2024

Conversation

gregtyler
Copy link
Contributor

We can't kick back a 400 response to the scanners because they can't change what they send, so log and accept the validation errors.

Plus fix an existing bug with unmarshalling empty dates.

For CTC-146 #patch

We can't kick back a 400 response to the scanners because they can't change what they send, so log and accept the validation errors.

Plus fix an existing bug with unmarshalling empty dates.

For CTC-146 #patch
problem := shared.ProblemInvalidRequest
problem.Errors = errs
if input.Channel == shared.ChannelPaper {
l.logger.Info("encountered validation errors in lpa", slog.Any("uid", uid))
Copy link
Contributor

Choose a reason for hiding this comment

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

what is the slightly longer term plan for these errors? are we going to store them on the document like sirius does now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Still working on that a bit. We know Sirius will need to do validation too, moreso than any done here, to direct caseworkers to anything that needs attention (e.g. R&C != "" is valid, but needs review).

In a perfect world we'd capture these errors and forward them to Sirius (probably through an event) to turn into tasks, but I'm not sure how compatible depending on Sirius's implementation.

Once we get the list of (business-focussed) validation errors through and start speccing up the Sirius work, we can check how we can tie them together.

@gregtyler gregtyler merged commit eab1525 into main May 10, 2024
23 checks passed
@gregtyler gregtyler deleted the CTC-146-support-paper-lpas branch May 10, 2024 08:41
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