server : created functions to handle typical error responses like resBadRequest, resNotFound, or resInternalError