Skip to content

Commit

Permalink
Fix component not found error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Bak committed Dec 4, 2023
1 parent 48a2b7d commit 492d6ca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased
### Changed
- Sessions the specify nodes that aren't in the current tenant will fail
- Sessions that specify nodes that aren't in the current tenant will fail

## [2.10.0] - 10-18-2023
### Fixed
Expand Down
8 changes: 4 additions & 4 deletions src/bos/server/controllers/v2/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def patch_v2_components_list(data):
component_id = component_data['id']
if component_id not in DB or not _is_valid_tenant_component(component_id):
return connexion.problem(
status=404, title="Component could not found.",
status=404, title="Component not found.",
detail="Component {} could not be found".format(component_id))
components.append((component_id, component_data))
except Exception as err:
Expand Down Expand Up @@ -251,7 +251,7 @@ def get_v2_component(component_id):
LOGGER.debug("GET /components/id invoked get_component")
if component_id not in DB or not _is_valid_tenant_component(component_id):
return connexion.problem(
status=404, title="Component could not found.",
status=404, title="Component not found.",
detail="Component {} could not be found".format(component_id))
component = DB.get(component_id)
component = _set_status(component)
Expand Down Expand Up @@ -281,7 +281,7 @@ def patch_v2_component(component_id):
LOGGER.debug("PATCH /components/id invoked patch_component")
if component_id not in DB or not _is_valid_tenant_component(component_id):
return connexion.problem(
status=404, title="Component could not found.",
status=404, title="Component not found.",
detail="Component {} could not be found".format(component_id))
try:
data = connexion.request.get_json()
Expand Down Expand Up @@ -325,7 +325,7 @@ def delete_v2_component(component_id):
LOGGER.debug("DELETE /components/id invoked delete_component")
if component_id not in DB or not _is_valid_tenant_component(component_id):
return connexion.problem(
status=404, title="Component could not found.",
status=404, title="Component not found.",
detail="Component {} could not be found".format(component_id))
return DB.delete(component_id), 204

Expand Down

0 comments on commit 492d6ca

Please sign in to comment.