proper error sending