Grokking Spring Boot
Vote

0% completed

​

Validating Input

Before this lesson, we sent five broken booking requests to POST /bookings:

  • {"eventId":7,"seatLabel":""}, an empty seat label.
  • {"eventId":-5,"seatLabel":"A12"}, an event id below zero.
  • {"eventId":7}, no seat label at all.
  • {"eventId":7,"seatLabel":"a12"}, a lowercase row letter.
  • {"eventId":7,"seatLabel":"Z99"}, a seat that Riverside Hall does not have.

All five returned the same answer: 404 Not Found. Each request reached BookingService, which searched for the seat, found nothing, and threw "Seat not found"

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content