Send invalid encoding error to callback