fixed the 500 error when question throw the internalServerError

@prakashraja89  remove unused code