Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.20
2.0.21
9 changes: 4 additions & 5 deletions entity-api-spec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.0.0
info:
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>'
version: 2.0.19
description: 'The HuBMAP Entity API is a standard RESTful web service with create, update and read operations for the standard HuBMAP provenance graph entities.'
version: 2.0.21
title: HuBMAP Entity API
contact:
name: HuBMAP Help Desk
Expand Down Expand Up @@ -440,7 +440,6 @@ components:
- seqfish
- sequence_library
- serum
- sequence_library
- single_cell_cryopreserved
- snatacseq
- snrnaseq
Expand Down Expand Up @@ -1306,11 +1305,11 @@ paths:
description: The user's token has expired or the user did not supply a valid token
'500':
description: Internal error
'/collections/{collection_uuid}}/add-datasets':
'/collections/{id}/add-datasets':
put:
summary: Link the given list of datasets to the target collection
parameters:
- name: collection_uuid
- name: id
in: path
description: The UUID of target collection
required: true
Expand Down
14 changes: 14 additions & 0 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2614,6 +2614,20 @@ def create_multiple_samples_details(request, normalized_entity_type, user_token,
# Log the full stack trace, prepend a line with our message
logger.exception(e)
bad_request_error(e)
except requests.exceptions.RequestException as e:
msg = f"Failed to create new HuBMAP ids via the uuid-api service"
logger.exception(msg)

# Due to the use of response.raise_for_status() in schema_manager.create_hubmap_ids()
# we can access the status codes from the exception
status_code = e.response.status_code

if status_code == 400:
bad_request_error(e.response.text)
if status_code == 404:
not_found_error(e.response.text)
else:
internal_server_error(e.response.text)

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