Commit c7414ed2 authored by Luc Yriarte's avatar Luc Yriarte
Browse files

Properly raise bulk not found exception on get data version with no bulk urn

parent f5382f0e
......@@ -270,7 +270,10 @@ async def get_data_version(
dask_blob_storage: DaskBulkStorage = Depends(with_dask_blob_storage),
record = await fetch_record(ctx, record_id, version)
bulk_id, prefix = BulkId.bulk_urn_decode(get_bulk_uri(record))
bulk_uri = get_bulk_uri(record)
if bulk_uri is None:
raise BulkNotFound(record_id=record_id, bulk_id=None)
bulk_id, prefix = BulkId.bulk_urn_decode(bulk_uri)
raise BulkNotFound(record_id=record_id, bulk_id=bulk_id)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment