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

Hw19.2 #28

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Hw19.2 #28

wants to merge 2 commits into from

Conversation

vladspirin
Copy link
Owner

No description provided.

@vladspirin vladspirin requested a review from antohaUa December 19, 2024 13:38
@vladspirin vladspirin self-assigned this Dec 19, 2024
Comment on lines +42 to +49
except HTTPError as http_err:
_log.error(f'HTTP error: {http_err}')
except Timeout as time_err:
_log.error(f'Timeout error: {time_err}')
except FileNotFoundError as file_err:
_log.error(f'File not found: - {file_err}')
except Exception as err:
_log.error(f'An unexpected error occurred: {err}')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to add helper function do_request and put all request error handling there. No sense to keep duplicate code for upload/get/delete operations
Other error handling like FileNotFound could be placed to main block

@vladspirin vladspirin added the need to improve There is a possibility of improving the code label Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need to improve There is a possibility of improving the code
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants