Add error object's data attribute