Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Feature: Example User management service with validations and meaningful error responses #5

Closed
2 tasks done
ArielMAJ opened this issue Jul 15, 2024 · 0 comments · Fixed by #7
Closed
2 tasks done

Comments

@ArielMAJ
Copy link
Owner

Type of feature

🍕 Feature

Current behavior

User model/repository is directly called and returned on entrypoints. If user is not found or there is some other kind of error (e.g. user_id doesn't exist when getting/updating/deleting) we get a 500 status code.

Suggested solution

Implement a UserService and also add pydantic fields, in which it will correctly run validations on entrypoint requests before returning and raise meaning HTTPError responses in case of not found IDs, etc.

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Contributing Docs

  • I agree to follow this project's Contribution Docs
ArielMAJ added a commit that referenced this issue Jul 15, 2024
refactor entrypoints and schemas

fix tests and use anyio/asyncio for running async tests
ArielMAJ added a commit that referenced this issue Jul 16, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant