added 500 internal error, itegrity error