catch sync exceptions from sql and convert to status 500