Closed surajit-zs closed 3 weeks ago
Status code and Correlation ID are already present, we would be adding Error Message.
While we are doing this, we also need to ensure that all logs are also having the corresponding correlation ID with the line. Otherwise it will be difficult to track which error got generated during a given request lifecycle.
@aryanmehrotra I would like to work on this issue. please assign it to me
@aditya028 - Sure, assigning this to you.
will it look something like this after the error log or there other changes need to be done @srijan-27 @aryanmehrotra
@aditya028 - Yes, this would be the expected behaviour.
@aditya028 - Are you working on it? Please let me know if you need any help.
@aditya028 - Are you working on it? Please let me know if you need any help.
@srijan-27 Yes i am working on it and will make the PR this weekand
When an error is returned, only the status code and correlation ID are logged, without the error message. This makes the logs less useful, as the reason for the error is not visible.
ref:![image](https://github.com/user-attachments/assets/c41773ad-3619-4811-b7bc-0641ec2df9aa)
To get the error message, we are manually logging the error before returning it. However, this only logs the error message without additional context like the status code and correlation ID.
ref:![image](https://github.com/user-attachments/assets/15cc87aa-79b2-40db-bdf5-b77a727d62c3)
Proposed Enhancement It would be helpful if the system automatically logged errors by default, including:
Error message Status code Correlation ID