modified error schema