mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-08 12:13:34 +02:00
Return tuple and do error mapping
This commit is contained in:
parent
6b6aed8f24
commit
ce361cdd3b
3 changed files with 25 additions and 30 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue