diff --git a/app/controllers/api/v1/registrant/registry_locks_controller.rb b/app/controllers/api/v1/registrant/registry_locks_controller.rb index b01e6b40d..57a0bfd0c 100644 --- a/app/controllers/api/v1/registrant/registry_locks_controller.rb +++ b/app/controllers/api/v1/registrant/registry_locks_controller.rb @@ -17,7 +17,7 @@ module Api if @domain.remove_registry_lock render json: @domain else - render json: { errors: [{ base: ['Domain not locked'] }] }, + render json: { errors: [{ base: ['Domain is not locked'] }] }, status: :unprocessable_entity end end diff --git a/doc/registrant-api/v1/domain_lock.md b/doc/registrant-api/v1/domain_lock.md index 5f275edb4..7e24e2827 100644 --- a/doc/registrant-api/v1/domain_lock.md +++ b/doc/registrant-api/v1/domain_lock.md @@ -139,12 +139,12 @@ Content-Type: application/json #### Response for failure ``` -HTTP/1.1 400 +HTTP/1.1 422 Content-Type: application/json { "errors": [ - { "base": "domain cannot be unlocked" } + { "base": "Domain is not locked" } ] } diff --git a/test/integration/api/registrant/registrant_api_domain_registry_lock_test.rb b/test/integration/api/registrant/registrant_api_domain_registry_lock_test.rb index 8ad1d0826..1548c5d13 100644 --- a/test/integration/api/registrant/registrant_api_domain_registry_lock_test.rb +++ b/test/integration/api/registrant/registrant_api_domain_registry_lock_test.rb @@ -85,7 +85,7 @@ class RegistrantApiDomainRegistryLockTest < ApplicationIntegrationTest response_json = JSON.parse(response.body, symbolize_names: true) assert_equal(422, response.status) - assert_equal({ errors: [{ base: ['Domain not locked'] }] }, response_json) + assert_equal({ errors: [{ base: ['Domain is not locked'] }] }, response_json) end def test_returns_404_when_domain_is_not_found