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.
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
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.