Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
HELpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
HELpy
Commits
0795de45
Commit
0795de45
authored
2 months ago
by
Michał Kudela
Browse files
Options
Downloads
Patches
Plain Diff
Handle ReadTimeout error in RequestCommunicator class
parent
7241c388
No related branches found
No related tags found
No related merge requests found
Pipeline
#113249
passed
2 months ago
Stage: static_code_analysis
Stage: build
Stage: helpy
Stage: beekeepy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
helpy/helpy/_communication/request_communicator.py
+2
-0
2 additions, 0 deletions
helpy/helpy/_communication/request_communicator.py
with
2 additions
and
0 deletions
helpy/helpy/_communication/request_communicator.py
+
2
−
0
View file @
0795de45
...
@@ -34,6 +34,8 @@ class RequestCommunicator(AbstractCommunicator):
...
@@ -34,6 +34,8 @@ class RequestCommunicator(AbstractCommunicator):
data_received
=
response
.
content
.
decode
()
data_received
=
response
.
content
.
decode
()
self
.
_assert_status_code
(
status_code
=
response
.
status_code
,
sent
=
data
,
received
=
data_received
)
self
.
_assert_status_code
(
status_code
=
response
.
status_code
,
sent
=
data
,
received
=
data_received
)
return
data_received
# noqa: TRY300
return
data_received
# noqa: TRY300
except
requests
.
exceptions
.
ReadTimeout
as
error
:
last_exception
=
error
except
requests
.
exceptions
.
ConnectionError
as
error
:
except
requests
.
exceptions
.
ConnectionError
as
error
:
raise
CommunicationError
(
url
=
url
.
as_string
(),
request
=
data
)
from
error
raise
CommunicationError
(
url
=
url
.
as_string
(),
request
=
data
)
from
error
except
requests
.
exceptions
.
RequestException
as
error
:
except
requests
.
exceptions
.
RequestException
as
error
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment