catch URLError and return 400

Combined with https://github.com/dimagi/couchexport/pull/57 fixes case 79598