-
Notifications
You must be signed in to change notification settings - Fork 44
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
v1/internal: refactor GetComposeStatus
improve error handling
#1324
base: main
Are you sure you want to change the base?
Conversation
3e9f6ca
to
1f37e93
Compare
Codecov ReportAttention: Patch coverage is
|
1f37e93
to
17e1d2c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this makes the functions smaller and more readable
it duplicates the number of requests (calling h.getComposeByIdAndOrgId(ctx, composeId)
twice now)?
If I'm right - this should be optimized to avoid duplicating the number of external requests
17e1d2c
to
2c6fd00
Compare
2c6fd00
to
7079a25
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, I'm not familiar with the image-builder codebase so please take my review with a grain of salt. I have some suggestions inline about structure and naming though that are maybe/hopefully helpful :)
7079a25
to
3852b9e
Compare
ab51f06
to
9b4a036
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you and sorry that it took me so long to look at this! This looks nice, some tiny naming/code organisation suggestions inline for your consideration.
9b4a036
to
8e3471f
Compare
…ode structure this commit improve error handling and code structure * Split GetComposeStatus into smaller, more focused functions * Enhance error handling with more specific HTTP status codes *Add dedicated functions for handling different response scenarios * Implement parseAndRedactComposeRequest for better separation of concerns * Improve code readability and maintainability
8e3471f
to
f55a3b2
Compare
this commit improve error handling and code structure