added field error directive
bug fixes