Open ctgraham opened 5 years ago
Scanning an invalid book barcode into the /books/scan/ method does not provide notice of failure to the user.
/books/scan/
The redirect happens before the error message is queued: https://github.com/ulsdevteam/lcsu/blob/c59adcfab4159701213f24f1fbd55a122b5a1edd/src/Controller/BooksController.php#L83-L93
We also don't check to see if the Book->save method is successful. This should fail, for example, if a book already in the system is scanned again. https://github.com/ulsdevteam/lcsu/blob/c59adcfab4159701213f24f1fbd55a122b5a1edd/src/Controller/BooksController.php#L64
Book->save
This if statement is still unchecked for failure: https://github.com/ulsdevteam/lcsu/blob/c4ea43fc306a57f18defca7f46c0a56b29954b30/src/Controller/BooksController.php#L64-L82
Scanning an invalid book barcode into the
/books/scan/
method does not provide notice of failure to the user.The redirect happens before the error message is queued: https://github.com/ulsdevteam/lcsu/blob/c59adcfab4159701213f24f1fbd55a122b5a1edd/src/Controller/BooksController.php#L83-L93
We also don't check to see if the
Book->save
method is successful. This should fail, for example, if a book already in the system is scanned again. https://github.com/ulsdevteam/lcsu/blob/c59adcfab4159701213f24f1fbd55a122b5a1edd/src/Controller/BooksController.php#L64