When calling set-domain we first check if the API key is valid for the the domain thus inherently check if the domain is in the DB.
When a new use attempt to call set-domain he should be informed via error message to use to enable-domain endpoint, i.e.
"Domain does not exist. Please use /enable-domain."
since we first check the api key and not whether the domain is in the DB we don't return the correct error to the caller.
Acceptance Criteria:
- rewrite the logic for
set-domain (and other endpoints) which should first check if the domain is not registered with namestone and display the correct error message to the user.
- add tests in
set-domain.tests.js to cover this testcase
When calling
set-domainwe first check if the API key is valid for the the domain thus inherently check if the domain is in the DB.When a new use attempt to call
set-domainhe should be informed via error message to use toenable-domainendpoint, i.e.since we first check the api key and not whether the domain is in the DB we don't return the correct error to the caller.
Acceptance Criteria:
set-domain(and other endpoints) which should first check if thedomainis not registered with namestone and display the correct error message to the user.set-domain.tests.jsto cover this testcase