Return tuple and do error mapping

This commit is contained in:
zandercymatics 2024-01-09 14:07:41 -07:00
parent 6b6aed8f24
commit ce361cdd3b
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
3 changed files with 25 additions and 30 deletions

View file

@ -91,10 +91,9 @@ def available(request, domain=""):
Domain = apps.get_model("registrar.Domain")
domain = request.GET.get("domain", "")
json_response = Domain.validate_and_handle_errors(
_, json_response = Domain.validate_and_handle_errors(
domain=domain,
error_return_type=ValidationErrorReturnType.JSON_RESPONSE,
display_success=True,
error_return_type=ValidationErrorReturnType.JSON_RESPONSE,
)
return json_response