corrected key to error attribute