klesh opened a new pull request, #7031:
URL: https://github.com/apache/incubator-devlake/pull/7031

   ### Summary
   Thanks @leric  for pointing out the problem at 
https://github.com/apache/incubator-devlake/pull/7016#discussion_r1502370197
   
   It was wrong to modify the status code on the `api_client` level which 
deprive the change for caller to obtain the original status code.
   
   However, we still need to avoid returning 401/403 status code since it would 
break the Basic Auth mechanism when users chose to enable it 
https://github.com/apache/incubator-devlake/blob/main/devops/releases/lake-v0.20.0/docker-compose.yml#L78
   
   This fix moves the status code wrapping logic to the `api.UnmarshalResponse` 
function so plugins could have a chance to handle the status code on its own.
   
   
   
   ### Does this close any open issues?
   Related to: #7601, #6561
   
   ### Screenshots
   jira wrong endpoint
   
![image](https://github.com/apache/incubator-devlake/assets/61080/a08b1d6f-2137-4787-b340-d435d0e37dcf)
   jira wrong user/pass
   
![image](https://github.com/apache/incubator-devlake/assets/61080/37e1c330-ccb0-4f22-b484-1faa4ae848a4)
   github remote scope list with expired token 
   
![image](https://github.com/apache/incubator-devlake/assets/61080/b4fd0490-426c-4849-b126-62c363902b0c)
   
   
   
   ### Other Information
   Any other information that is important to this PR.
   


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