Skip to content

refactor: change error definition in experiment PKG to Bucketeer error - #2124

Merged
kakcy merged 6 commits into
mainfrom
refactor-error-handle-experiment
Sep 30, 2025
Merged

refactor: change error definition in experiment PKG to Bucketeer error#2124
kakcy merged 6 commits into
mainfrom
refactor-error-handle-experiment

Conversation

@kakcy

@kakcy kakcy commented Sep 16, 2025

Copy link
Copy Markdown
Contributor

This pull request refactors error handling in the experiment service by standardizing gRPC status creation and error responses. Instead of manually constructing detailed error responses throughout the code, it now leverages a centralized error utility, resulting in cleaner, more maintainable, and consistent error handling. The changes affect both experiment and goal-related APIs.

I have also standardized the process of assigning ErrorInfo to GRPCStatus for each error via api.NewGRPCStatus.
This ErrorInfo will be used when moving i18n to the frontend(#1253), and we plan to generate error messages etc. based on this information on the frontend.

@kakcy
kakcy marked this pull request as ready for review September 16, 2025 07:59
nnnkkk7
nnnkkk7 previously approved these changes Sep 22, 2025

@nnnkkk7 nnnkkk7 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you!
Looks good!!

# Conflicts:
#	pkg/experiment/api/api.go
#	pkg/experiment/api/experiment.go
#	pkg/experiment/api/goal.go
#	pkg/experiment/domain/experiment.go
#	pkg/experiment/storage/v2/experiment.go
@kakcy

kakcy commented Sep 30, 2025

Copy link
Copy Markdown
Contributor Author

@nnnkkk7
A conflict occurred with the main branch, so the approved status was removed after merging.
I'm sorry, but could you please approve it again?

@kakcy
kakcy requested a review from nnnkkk7 September 30, 2025 02:12
@kakcy
kakcy merged commit f28c48d into main Sep 30, 2025
11 checks passed
@kakcy
kakcy deleted the refactor-error-handle-experiment branch September 30, 2025 02:28
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