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
4 changes: 2 additions & 2 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ The project uses [Hypothesis](https://hypothesis.readthedocs.io) for property-ba

Project Documentation is written in Markdown and built using [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/). API documentation is built from docstrings using [mkdocstrings](https://mkdocstrings.github.io/).

To preview the documentation on your local, run:
To preview the documentation locally, run:
```bash
mise run local
```
Expand All @@ -96,7 +96,7 @@ A good bug report shouldn't leave others needing to chase you up for more inform

- Make sure that you are using the latest version.
- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions.
- Search exisitng issues to see if other users have experienced (and potentially already solved) the same issue you are having.
- Search existing issues to see if other users have experienced (and potentially already solved) the same issue you are having.
- Also make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub community have discussed the issue.
- Collect information about the bug, e.g., Stack trace (Traceback), OS, platform, and version, .. etc

Expand Down
2 changes: 1 addition & 1 deletion templates/api/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def get_item(id: str) -> Response:
"""
try:
if (item := repository.get_item(id)) is None:
return JsonResponse({"message": "Not found"}, status_code=404)
return JsonResponse({"message": f"Item '{id}' not found"}, status_code=404)
item = Item.model_validate(item) # Validate model after retrieval to ensure data integrity
except Exception as exc:
message = "Item validation failed" if isinstance(exc, ValidationError) else "Error retrieving item"
Expand Down
2 changes: 2 additions & 0 deletions tests/api/test_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ def test_get_item_not_found(mock_repo, lambda_context):
response = handler_module.main(event, lambda_context)

assert response["statusCode"] == 404
body = loads(response["body"])
assert body["message"] == "Item 'missing' not found"


def test_post_item_invalid_body(mock_repo, lambda_context):
Expand Down