Skip to content

Wrong error message while creating a topic to a non existing namespace #9220

@eolivelli

Description

@eolivelli

Describe the bug

When you try to create a topic to a non existant namespace (in this cae 'defaul' instead of 'default') you got an error that is very hard to understand for the user

bin/pulsar-admin topics create persistent://public/defaul/topic1
14:56:09.681 [AsyncHttpClient-7-1] WARN  org.apache.pulsar.client.admin.internal.BaseResource - [http://localhost:8080/admin/v2/persistent/public/defaul/topic1] Failed to perform http put request: javax.ws.rs.ClientErrorException: HTTP 412 Precondition Failed
Namespace does not have any clusters configured

Expected behavior
An error like 'namespace does not exist'

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugThe PR fixed a bug or issue reported a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions