Zoneedit: Provide better error message on error 702 responses.
Message ID | 1461930782-25457-1-git-send-email-stefan.schantl@ipfire.org |
---|---|
State | Superseded |
Headers |
Return-Path: <ddns-bounces@lists.ipfire.org> Received: from mail01.ipfire.org (hedwig.ipfire.org [172.28.1.200]) by web02.ipfire.org (Postfix) with ESMTP id 6D6696279B for <patchwork@ipfire.org>; Fri, 29 Apr 2016 13:53:01 +0200 (CEST) Received: from mail01.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id D7F0E14BD; Fri, 29 Apr 2016 13:53:00 +0200 (CEST) Received: from tuxedo.stevee (178.115.129.197.wireless.dyn.drei.com [178.115.129.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 8803AC63; Fri, 29 Apr 2016 13:52:57 +0200 (CEST) From: Stefan Schantl <stefan.schantl@ipfire.org> To: ddns@lists.ipfire.org Subject: [PATCH] Zoneedit: Provide better error message on error 702 responses. Date: Fri, 29 Apr 2016 13:53:02 +0200 Message-Id: <1461930782-25457-1-git-send-email-stefan.schantl@ipfire.org> X-Mailer: git-send-email 2.5.5 X-BeenThere: ddns@lists.ipfire.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List for the IPFire dynamic DNS client <ddns.lists.ipfire.org> List-Unsubscribe: <http://lists.ipfire.org/mailman/options/ddns>, <mailto:ddns-request@lists.ipfire.org?subject=unsubscribe> List-Archive: <http://lists.ipfire.org/pipermail/ddns/> List-Post: <mailto:ddns@lists.ipfire.org> List-Help: <mailto:ddns-request@lists.ipfire.org?subject=help> List-Subscribe: <http://lists.ipfire.org/mailman/listinfo/ddns>, <mailto:ddns-request@lists.ipfire.org?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ddns-bounces@lists.ipfire.org Sender: "ddns" <ddns-bounces@lists.ipfire.org> |
Message
Stefan Schantl
April 29, 2016, 9:53 p.m. UTC
A returned error code 702 when using Zoneedit as provider now raise
a request error with an corresponding message instead of a simple
InternalServerError exception.
This will help to clarify and debug update problems.
Fixes #11042.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
---
src/ddns/providers.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Hi, you are introducing whitespace errors there by using spaces instead of tabs. -Michael P.S. You can also send this patch to both mailing lists at the same time by using Cc. On Fri, 2016-04-29 at 13:53 +0200, Stefan Schantl wrote: > A returned error code 702 when using Zoneedit as provider now raise > a request error with an corresponding message instead of a simple > InternalServerError exception. > > This will help to clarify and debug update problems. > > Fixes #11042. > > Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org> > --- > src/ddns/providers.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/ddns/providers.py b/src/ddns/providers.py > index 3845193..dbe9261 100644 > --- a/src/ddns/providers.py > +++ b/src/ddns/providers.py > @@ -1576,7 +1576,7 @@ class DDNSProviderZoneedit(DDNSProvider): > elif output.startswith("<ERROR CODE=\"704\""): > raise DDNSRequestError(_("No valid FQDN was > given.")) > elif output.startswith("<ERROR CODE=\"702\""): > - raise DDNSInternalServerError > + raise DDNSRequestError(_("Too frequent update > requests have been sent.")) > > # If we got here, some other update error happened. > raise DDNSUpdateError
Thanks for reviewing, I really don't know why this happened. It seems my vim is miss- configured and translates tabs into spaces. When using nano as editor everything works fine.... I'll fix this issue and send a new patch. -Stefan > Hi, > > you are introducing whitespace errors there by using spaces instead > of tabs. > > -Michael > > P.S. You can also send this patch to both mailing lists at the same > time by > using Cc. > > On Fri, 2016-04-29 at 13:53 +0200, Stefan Schantl wrote: > > > > A returned error code 702 when using Zoneedit as provider now raise > > a request error with an corresponding message instead of a simple > > InternalServerError exception. > > > > This will help to clarify and debug update problems. > > > > Fixes #11042. > > > > Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org> > > --- > > src/ddns/providers.py | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/src/ddns/providers.py b/src/ddns/providers.py > > index 3845193..dbe9261 100644 > > --- a/src/ddns/providers.py > > +++ b/src/ddns/providers.py > > @@ -1576,7 +1576,7 @@ class DDNSProviderZoneedit(DDNSProvider): > > elif output.startswith("<ERROR CODE=\"704\""): > > raise DDNSRequestError(_("No valid FQDN > > was > > given.")) > > elif output.startswith("<ERROR CODE=\"702\""): > > - raise DDNSInternalServerError > > + raise DDNSRequestError(_("Too frequent > > update > > requests have been sent.")) > > > > # If we got here, some other update error > > happened. > > raise DDNSUpdateError