Bug removal and modification on error response

modified the format of error response message and removed one bug
relating to query to table dnrentity