ThreeDotsLabs / wild-workouts-go-ddd-example

Go DDD example application. Complete project to show how to apply DDD, Clean Architecture, and CQRS by practical refactoring.
https://threedots.tech
MIT License
5.04k stars 464 forks source link

Given an invalid hour, it returns internal-server-error #43

Open haibin opened 2 years ago

haibin commented 2 years ago

Given an invalid hour, it returns internal-server-error. I was expecting a bad request.

$ curl --location --request PUT 'http://localhost:3000/api/trainer/calendar/make-hour-available' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX3V1aWQiOiIxIiwiZW1haWwiOiJ0cmFpbmVyQHRocmVlZG90cy50ZWNoIiwicm9sZSI6InRyYWluZXIiLCJuYW1lIjoiVHJhaW5lciIsImlhdCI6MTYzMDkyNDE3NH0.veziMkcul16lUnQwV7HnNPSf19AkntaDlPDRfNYBkKI' \
--header 'Content-Type: application/json' \
--data-raw '{
    "hours": [
        "aaaaaa"
    ]
}'

{"slug":"internal-server-error"}