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

Use Result for process_analysis_request. #554

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

jasonforal
Copy link
Collaborator

@jasonforal jasonforal commented Nov 6, 2024

What problem are you trying to solve?

I'm going to be adding optional support for caching within process_analysis_request, and part of this will introduce control flow that is much more readable using the idiomatic ? operator. It's a good time to clean this function up a bit.

What is your solution?

Refactor process_analysis_request to use a Result.

This is a code cleanup. The serialized response remains the exact same.

Alternatives considered

What the reviewer should know

  • Some tracing logs were deleted while refactoring because they were redundant (for example, we were logging the info message "Validation error: configuration is not a base64 string" despite our error message also being "configuration-not-base64"). The human friendly version isn't particularly necessary here.
    • No internal services rely on these strings, so they are safe to change.

@jasonforal jasonforal requested a review from juli1 November 6, 2024 17:14
@jasonforal jasonforal requested a review from a team as a code owner November 6, 2024 17:14
Copy link
Collaborator

@amaanq amaanq left a comment

Choose a reason for hiding this comment

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

nice!

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