Skip to content

Commit 7a24288

Browse files
authored
Merge pull request #262 from hubmapconsortium/test-release
v2.0.21 release
2 parents ad428e6 + 42bd14d commit 7a24288

File tree

3 files changed

+19
-6
lines changed

3 files changed

+19
-6
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.0.20
1+
2.0.21

entity-api-spec.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
openapi: 3.0.0
22
info:
3-
description: 'The HuBMAP Entity API is a standard RESTful web service with create, update and read operations for the standard HuBMAP provenance graph entities.<br><br>'
4-
version: 2.0.19
3+
description: 'The HuBMAP Entity API is a standard RESTful web service with create, update and read operations for the standard HuBMAP provenance graph entities.'
4+
version: 2.0.21
55
title: HuBMAP Entity API
66
contact:
77
name: HuBMAP Help Desk
@@ -440,7 +440,6 @@ components:
440440
- seqfish
441441
- sequence_library
442442
- serum
443-
- sequence_library
444443
- single_cell_cryopreserved
445444
- snatacseq
446445
- snrnaseq
@@ -1306,11 +1305,11 @@ paths:
13061305
description: The user's token has expired or the user did not supply a valid token
13071306
'500':
13081307
description: Internal error
1309-
'/collections/{collection_uuid}}/add-datasets':
1308+
'/collections/{id}/add-datasets':
13101309
put:
13111310
summary: Link the given list of datasets to the target collection
13121311
parameters:
1313-
- name: collection_uuid
1312+
- name: id
13141313
in: path
13151314
description: The UUID of target collection
13161315
required: true

src/app.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2614,6 +2614,20 @@ def create_multiple_samples_details(request, normalized_entity_type, user_token,
26142614
# Log the full stack trace, prepend a line with our message
26152615
logger.exception(e)
26162616
bad_request_error(e)
2617+
except requests.exceptions.RequestException as e:
2618+
msg = f"Failed to create new HuBMAP ids via the uuid-api service"
2619+
logger.exception(msg)
2620+
2621+
# Due to the use of response.raise_for_status() in schema_manager.create_hubmap_ids()
2622+
# we can access the status codes from the exception
2623+
status_code = e.response.status_code
2624+
2625+
if status_code == 400:
2626+
bad_request_error(e.response.text)
2627+
if status_code == 404:
2628+
not_found_error(e.response.text)
2629+
else:
2630+
internal_server_error(e.response.text)
26172631

26182632
# Use the same json_data_dict and user_info_dict for each sample
26192633
# Only difference is the `uuid` and `hubmap_id` that are generated

0 commit comments

Comments
 (0)