Handle processing errors correctly