Add i18n, change error response code to 2304

This commit is contained in:
Alex Sherman 2021-02-15 19:46:16 +05:00
parent 340e1820f2
commit b9d57be6ab
4 changed files with 7 additions and 5 deletions

View file

@ -20,7 +20,7 @@ module Actions
end
if contact.delete_prohibited?
contact.errors.add(:status, :delete_prohibited)
contact.errors.add(:statuses, :delete_prohibited)
return
end

View file

@ -82,9 +82,11 @@ class Epp::Contact < Contact
'2302' => [ # Object exists
[:code, :epp_id_taken]
],
'2304' => [ # Status prohibits operation
[:statuses, :delete_prohibited],
],
'2305' => [ # Association exists
[:domains, :exist],
[:domains, :delete_prohibited],
]
}
end