From 8728bdccf7292d8cd643a597825df9ef2913c0e6 Mon Sep 17 00:00:00 2001 From: Tom Ritter Date: Thu, 19 Apr 2018 17:31:00 +0000 Subject: [PATCH] Bug 1455378 Give an informative error message of you try to ./mach pastebin too large a file. r=gps --HG-- extra : rebase_source : 719fb33701b159955494031708d9366a57b31f9a --- tools/mach_commands.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/mach_commands.py b/tools/mach_commands.py index 70d8cb7824a5..b9d5cc3d85e6 100644 --- a/tools/mach_commands.py +++ b/tools/mach_commands.py @@ -151,7 +151,14 @@ class PastebinProvider(object): response = urllib2.urlopen(req) http_response_code = response.getcode() if http_response_code == 200: - print(response.geturl()) + pasteurl = response.geturl() + if pasteurl == URL: + if "Query failure: Data too long for column" in response.readline(): + print('ERROR. Request too large. Limit is 64KB.') + else: + print('ERROR. Unknown error') + else: + print(pasteurl) else: print('Could not upload the file, ' 'HTTP Response Code %s' % (http_response_code))