nanjiek commented on issue #755:
URL: https://github.com/apache/dubbo-go-pixiu/issues/755#issuecomment-3366049260

   **Based on the current code and architecture of Pixiu, I have summarized the 
issues and corresponding PRs as follows:**
   
   ### **1. The exception status codes for requests need to be standardized**
   
   * **Issue**: Currently, Pixiu does not have a standardized status code for 
exceptions encountered during client request processing. This needs to be 
standardized, where Pixiu should return a status code indicating the exception 
and a descriptive text message for client requests.
   * **PRs**:
   
     * **PR 1**: Define standardized exception status codes for client requests.
     * **PR 2**: Implement standardized status codes in error handling for 
client requests.
   
   ### **2. The methods for creating new errors vary**
   
   * **Issue**: The methods for creating errors in Pixiu are inconsistent. Some 
use `fmt.Errorf`, while others use `errors.New`. Additionally, `fmt.Errorf` 
covers the core functionality of `pkg/errors`, and the `github.com/pkg/errors` 
package is currently inactive.
   * **PRs**:
   
     * **PR 3**: Replace `errors.New` with `fmt.Errorf` in logging components.
     * **PR 4**: Globally replace `errors.New` with `fmt.Errorf` across the 
project.
   
   ### **3. The prefix used when logging is not standardized**
   
   * **Issue**: There is no standardized logging prefix. Some parts of the code 
use `pixiugatewaycmd`, while others use `dubbo-go-pixiu`.
   * **PR**:
   
     * **PR 5**: Standardize the logging prefix to `pixiu` across the project.
   
   ### **4. There is also no standardized error descriptor**
   
   * **Issue**: Error descriptors are inconsistent across Pixiu. There is no 
standard format for error messages and descriptions.
   * **PR**:
   
     * **PR 6**: Standardize the error description text format for all errors 
in Pixiu.
   
   ### **5. The methods for handling replenishment errors vary**
   
   * **Issue**: There is no consistent approach for handling replenishment 
errors. Some errors are panicked, while others are just logged.
   * **PR**:
   
     * **PR 7**: Define and implement error handling guidelines (when to 
`panic` vs. when to log).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to