1.complete query history save to db 2.add web application exception wrapped as json