when db error occured, return status code 500 now.
some modify