Try getting a game based on game ID: http://localhost:8080/api/gameAds/:id
Just write some gibberish as the ID value and postman should return an error message with "Game not found".
Try creating a game: http://localhost:8080/api/gameAds
And set the userID to some none-existing gibberish aswell, it should return an error message with "User not found".
I have added a custom Exception Handler to handle specific errors such as invalid user/game ID's, which also display custom messages.
Test the custom error messages for Game Ads in postman via my branch:
git checkout 98-update-error-messages-in-gamead-crud
Try getting a game based on game ID: http://localhost:8080/api/gameAds/:id Just write some gibberish as the ID value and postman should return an error message with "Game not found".
Try getting all games by a user ID: http://localhost:8080/api/gameAds/user/:userId And same as before, write something random as the ID value and it should return "User not found".
Try creating a game: http://localhost:8080/api/gameAds And set the userID to some none-existing gibberish aswell, it should return an error message with "User not found".
Try updating a game: http://localhost:8080/api/gameAds/:gameId And set the game ID value to whatever, it should return "Game with id (id) was not found".