From f15adde7120dfda99cb07fe3168540830c651553 Mon Sep 17 00:00:00 2001 From: Alysia Broddrick Date: Wed, 4 Oct 2023 18:05:51 -0700 Subject: [PATCH] added more comments --- src/registrar/models/utility/nameserver_error.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/registrar/models/utility/nameserver_error.py b/src/registrar/models/utility/nameserver_error.py index 32735a286..df04fb7eb 100644 --- a/src/registrar/models/utility/nameserver_error.py +++ b/src/registrar/models/utility/nameserver_error.py @@ -5,7 +5,11 @@ class NameserverErrorCodes(IntEnum): """Used in the NameserverError class for error mapping. Overview of nameserver error codes: - - + - 1 MISSING_IP ip address is missing for a nameserver + - 2 GLUE_RECORD_NOT_ALLOWED a host has a nameserver + value but is not a subdomain + - 3 INVALID_IP invalid ip address format or invalid version + - 4 TOO_MANY_HOSTS more than the max allowed host values """ MISSING_IP = 1 @@ -16,12 +20,10 @@ class NameserverErrorCodes(IntEnum): class NameserverError(Exception): """ - Overview of contact error codes: - + NameserverError class used when to raise exceptions on + the nameserver getter """ - # For linter - _error_mapping = { NameserverErrorCodes.MISSING_IP: "Nameserver {} needs to have an " "IP address because it is a subdomain",