if (data instanceof Error) {
    if (!(data instanceof httpErrors.HttpError)) {
      data = new httpErrors.InternalServerError(String(data));
    }