Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add log warning if auth fails when accessing repository #2577

Merged
merged 3 commits into from Sep 24, 2020
Merged

Add log warning if auth fails when accessing repository #2577

merged 3 commits into from Sep 24, 2020

Conversation

TimOrme
Copy link
Contributor

@TimOrme TimOrme commented Jun 17, 2020

Resolves: #2576

This just adds a more informative error message in the event that a repository fails due to an authorization error. Right now, poetry fails silently on that case.

I tried to add tests here, but because this is part of the core _get method, I couldn't really do so using the existing mock. I could perform mocking at the requests level, but wasn't sure if that was the usual way in the poetry project. Let me know the best way to test this.

Thanks!
Tim

@finswimmer finswimmer requested a review from a team Jun 20, 2020
@finswimmer finswimmer added the area/error-handling Bad error messages/insufficient error handling label Jun 20, 2020
@austinbutler
Copy link

austinbutler commented Sep 24, 2020

Would be nice to also have a 401 check. In my case it was a 401 with Artifactory configured to accept only encrypted passwords but received a clear text password, getting the encrypted password can be done via the WebUI..

This causes the error code handler to also check for 401 status as
well, since servers return 401 for different auth errors.
@TimOrme
Copy link
Contributor Author

TimOrme commented Sep 24, 2020

@austinbutler added this as well. Thanks!

abn
abn approved these changes Sep 24, 2020
@abn abn merged commit ad0cea9 into python-poetry:master Sep 24, 2020
@sdispater sdispater mentioned this pull request Sep 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/error-handling Bad error messages/insufficient error handling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Private Repositories Fail Silently on Auth Errors
4 participants