not sure but you might want to have a try catch. Try to modify and break one of the sql statements on purpose and see how it will work for you. If it fails big times then you need to create try-catch and through 500 error with some generic message