This commit is contained in:
David Kennedy 2023-12-14 18:08:35 -05:00
parent 493f64e070
commit e1de3dab68
No known key found for this signature in database
GPG key ID: 6528A5386E66B96B
2 changed files with 6 additions and 4 deletions

View file

@ -97,7 +97,9 @@ def available(request, domain=""):
if check_domain_available(domain):
return JsonResponse({"available": True, "code": "success", "message": DOMAIN_API_MESSAGES["success"]})
else:
return JsonResponse({"available": False, "code": "unavailable", "message": DOMAIN_API_MESSAGES["unavailable"]})
return JsonResponse(
{"available": False, "code": "unavailable", "message": DOMAIN_API_MESSAGES["unavailable"]}
)
except Exception:
return JsonResponse({"available": False, "code": "error", "message": DOMAIN_API_MESSAGES["error"]})

View file

@ -44,9 +44,9 @@ class GenericError(Exception):
_error_mapping = {
GenericErrorCodes.CANNOT_CONTACT_REGISTRY: (
"Were experiencing a system connection error. Please wait a few minutes "
"and try again. If you continue to receive this error after a few tries, "
"contact help@get.gov."
"Were experiencing a system connection error. Please wait a few minutes "
"and try again. If you continue to receive this error after a few tries, "
"contact help@get.gov."
),
GenericErrorCodes.GENERIC_ERROR: ("Value entered was wrong."),
}