interloper-api 0.49.0__tar.gz → 0.49.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. {interloper_api-0.49.0 → interloper_api-0.49.1}/PKG-INFO +1 -1
  2. {interloper_api-0.49.0 → interloper_api-0.49.1}/pyproject.toml +1 -1
  3. {interloper_api-0.49.0 → interloper_api-0.49.1}/pyproject.toml.orig +1 -1
  4. {interloper_api-0.49.0 → interloper_api-0.49.1}/src/interloper_api/routes/components.py +10 -2
  5. {interloper_api-0.49.0 → interloper_api-0.49.1}/README.md +0 -0
  6. {interloper_api-0.49.0 → interloper_api-0.49.1}/src/interloper_api/__init__.py +0 -0
  7. {interloper_api-0.49.0 → interloper_api-0.49.1}/src/interloper_api/app.py +0 -0
  8. {interloper_api-0.49.0 → interloper_api-0.49.1}/src/interloper_api/components.py +0 -0
  9. {interloper_api-0.49.0 → interloper_api-0.49.1}/src/interloper_api/dependencies.py +0 -0
  10. {interloper_api-0.49.0 → interloper_api-0.49.1}/src/interloper_api/email.py +0 -0
  11. {interloper_api-0.49.0 → interloper_api-0.49.1}/src/interloper_api/routes/__init__.py +0 -0
  12. {interloper_api-0.49.0 → interloper_api-0.49.1}/src/interloper_api/routes/admin.py +0 -0
  13. {interloper_api-0.49.0 → interloper_api-0.49.1}/src/interloper_api/routes/agent.py +0 -0
  14. {interloper_api-0.49.0 → interloper_api-0.49.1}/src/interloper_api/routes/auth.py +0 -0
  15. {interloper_api-0.49.0 → interloper_api-0.49.1}/src/interloper_api/routes/backfills.py +0 -0
  16. {interloper_api-0.49.0 → interloper_api-0.49.1}/src/interloper_api/routes/catalog.py +0 -0
  17. {interloper_api-0.49.0 → interloper_api-0.49.1}/src/interloper_api/routes/oauth.py +0 -0
  18. {interloper_api-0.49.0 → interloper_api-0.49.1}/src/interloper_api/routes/organisations.py +0 -0
  19. {interloper_api-0.49.0 → interloper_api-0.49.1}/src/interloper_api/routes/runs.py +0 -0
  20. {interloper_api-0.49.0 → interloper_api-0.49.1}/src/interloper_api/routes/tokens.py +0 -0
  21. {interloper_api-0.49.0 → interloper_api-0.49.1}/src/interloper_api/routes/ws.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: interloper-api
3
- Version: 0.49.0
3
+ Version: 0.49.1
4
4
  Summary: Interloper FastAPI routes
5
5
  Author: Guillaume Onfroy
6
6
  Author-email: Guillaume Onfroy <guillaume@digitlcloud.com>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "interloper-api"
3
- version = "0.49.0"
3
+ version = "0.49.1"
4
4
  description = "Interloper FastAPI routes"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -3,7 +3,7 @@
3
3
  # ###############
4
4
  [project]
5
5
  name = "interloper-api"
6
- version = "0.49.0"
6
+ version = "0.49.1"
7
7
  description = "Interloper FastAPI routes"
8
8
  readme = "README.md"
9
9
  authors = [{ name = "Guillaume Onfroy", email = "guillaume@digitlcloud.com" }]
@@ -299,6 +299,8 @@ def update_component(
299
299
  raise HTTPException(status_code=400, detail=str(e))
300
300
  except NotFoundError as e:
301
301
  raise HTTPException(status_code=404, detail=str(e))
302
+ except InUseError as e:
303
+ raise HTTPException(status_code=409, detail={"message": str(e), "used_by": e.referrers})
302
304
  return _to_response(row, store, include_config=True)
303
305
 
304
306
 
@@ -353,9 +355,15 @@ def remove_relation(
353
355
  user: Profile = Depends(get_current_user),
354
356
  store: Store = Depends(get_store),
355
357
  ) -> None:
356
- """Remove a component's relations of one type toward one destination."""
358
+ """Remove a component's relations of one type toward one destination.
359
+
360
+ Refused (400) for required dependency slots — repoint them instead.
361
+ """
357
362
  load_authorized(store.get_component, component_id, user, store, label="Component", minimum="editor")
358
- store.remove_relation(component_id, type=type, dst_id=dst_id)
363
+ try:
364
+ store.remove_relation(component_id, type=type, dst_id=dst_id)
365
+ except ConfigError as e:
366
+ raise HTTPException(status_code=400, detail=str(e))
359
367
 
360
368
 
361
369
  # -- Partition endpoint ---------------------------------------------------------