feat: enhance slug generation and validation

- Add robust error handling for `generateSlug`, throwing `BadRequestException` on invalid input.
- Improve error messages to provide clearer feedback in case of failures.
This commit is contained in:
oscargonzalezmoreno@gmail.com 2024-12-27 12:57:14 +01:00
parent 6609122f8a
commit 2b8909c17f
5 changed files with 81 additions and 12 deletions

View file

@ -4,7 +4,7 @@ POST {{baseUrl}}/rices
Content-Type: application/json
X-Zen-Rice-Name: cool-zenrice-aurora2
X-Zen-Rice-Author: jhon@doe.com
User-Agent: ZenBrowser/1.0.0 (EndeavourOS x86_64)
User-Agent: ZenBrowser/1.0.0.0 (EndeavourOS x86_64)
{
"userChrome": "",

View file

@ -7,7 +7,7 @@ Content-Type: application/json
x-zen-rices-token: {{previous_token}}
X-Zen-Rice-Name: cool-zenrice-aurora2
X-Zen-Rice-Author: jhon@doe.com
User-Agent: ZenBrowser/1.0.0 (EndeavourOS x86_64)
User-Agent: ZenBrowser/1.0.0.0 (EndeavourOS x86_64)
{
"userChrome": "",