return error immediately