Skip to content

You are not authorized to use this endpoint is returned instead Domain does not exist is never returned` when domain is not in DB #45

@mendeleden

Description

@mendeleden

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:

  1. 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.
  2. add tests in set-domain.tests.js to cover this testcase

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions