api
api copied to clipboard
Bug: add missing pipe validators
Describe the bug
There are a few places in the Nest controllers where we are missing pipe validators which can cause 500s. For example, in the workspace delete member controller:
https://github.com/open-sauced/api/blob/ecb7657374ece5181863b235f45df69ab86ccedc/src/workspace/workspace-members.controller.ts#L102-L106
providing the id: number
as a string will cause a 500 since there's no validator in this flow.
I'm sure there are a few places this is happening that we'll want to add validators in.
Steps to reproduce
- Attempt to delete workspace member with a malformed body:
{
"members": [
{
"id": "woofwoof"
}
]
}
- notice 500 is thrown
Browsers
No response
Additional context (Is this in dev or production?)
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Contributing Docs
- [X] I agree to follow this project's Contribution Docs