Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- При таком коде
- Quiz quiz = quizRepository.findOne(id);
- if (quiz == null) throw new NoSuchQuizException(id);// must 404
- получаю
- {"status": 500,"code": 500,"message": "FBI is interested in your talents!","developerMessage": "could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet","moreInfoUrl": "mailto:support@javarush.ru"}
- А при таком
- Quiz quiz = null;
- try{
- quiz = quizRepository.findOne(id);
- } catch (Exception ignore){
- }
- if (quiz == null) throw new NoSuchQuizException(id);
- Все нормально получаю свой 404
- {"status": 404,"code": 404,"message": "No such Quiz","developerMessage": "Quiz with id: 3 is not found on the Database","moreInfoUrl": "mailto:support@javarush.ru"}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement