Skip to content

Commit 584deb9

Browse files
committed
do not have a fallback
1 parent b4b45e7 commit 584deb9

File tree

1 file changed

+6
-18
lines changed
  • elsevier_coordinate_extraction/download

1 file changed

+6
-18
lines changed

elsevier_coordinate_extraction/download/api.py

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -157,24 +157,12 @@ async def _download_identifier(
157157
if payload is None:
158158
params = {"httpAccept": "text/xml", "view": view_used}
159159
path = _endpoint_path_for_identifier(identifier, identifier_type)
160-
try:
161-
response = await client.request(
162-
"GET",
163-
path,
164-
params=params,
165-
accept="application/xml",
166-
)
167-
except httpx.HTTPStatusError as exc:
168-
if params.get("view") and exc.response.status_code in {400, 401, 403}:
169-
view_used = "STANDARD"
170-
response = await client.request(
171-
"GET",
172-
path,
173-
params={"httpAccept": "text/xml"},
174-
accept="application/xml",
175-
)
176-
else:
177-
raise
160+
response = await client.request(
161+
"GET",
162+
path,
163+
params=params,
164+
accept="application/xml",
165+
)
178166
payload = response.content
179167
content_type = response.headers.get("content-type", "application/xml")
180168
metadata.update(

0 commit comments

Comments
 (0)