mappjzc opened a new issue, #3854:
URL: https://github.com/apache/incubator-devlake/issues/3854

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-devlake/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### What happened
   
   
![image](https://user-images.githubusercontent.com/2921251/205595487-cda01da1-0fbf-4fdf-82d7-8da103a2aeaf.png)
   We can see all detail of the error in the logs.
   
![img_v2_bd4a6d66-5974-455b-a6d9-027a6362f5ag](https://user-images.githubusercontent.com/2921251/205596030-a7eed1a8-ee7e-4a62-8c2b-cda2bc687028.jpg)
   But only one part of it is in the HTTP response.
   
   
![image](https://user-images.githubusercontent.com/2921251/205596178-53525a09-0c93-44d5-b025-59e3bb581a31.png)
   
![image](https://user-images.githubusercontent.com/2921251/205596217-5e489985-a784-4bc3-9866-6ecaaeed2681.png)
   
![image](https://user-images.githubusercontent.com/2921251/205596246-00aa1350-9afe-4706-989d-2022e553bbdb.png)
   
   That made us lose the necessary detail.
   
   As we see, the ApiOutputError uses the Message() to return the error for HTTP
   
![image](https://user-images.githubusercontent.com/2921251/205596797-ec596ad2-4f78-4eb3-8ef2-761a03c57c18.png)
   
   But in DefaultLogger:
   
![image](https://user-images.githubusercontent.com/2921251/205596942-c9e89b1d-99f4-4875-b41a-6b727ef825ca.png)
   
![image](https://user-images.githubusercontent.com/2921251/205597034-17e878c0-f7c0-4ba8-ae99-d902b0a0124d.png)
   it uses Error() to format the data.
   
   
   ### What do you expect to happen
   
   Show all detailed errors for the HTTP response.
   
   ### How to reproduce
   
   Post a project whose projectName already exists.
   See the HTTP response and logs.
   
   ### Anything else
   
   _No response_
   
   ### Version
   
   main
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


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

Reply via email to