Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error handling in @eclipse-ditto/ditto-javascript-client-dom #1113

Closed
thlandgraf opened this issue Jul 13, 2021 · 1 comment
Closed

error handling in @eclipse-ditto/ditto-javascript-client-dom #1113

thlandgraf opened this issue Jul 13, 2021 · 1 comment

Comments

@thlandgraf
Copy link

Hi,

when I open a ditto-connection with a wrong PW:

this.restclient = DittoDomClient.newHttpClient()
            .withoutTls()
            .withDomain(domain)
            .withAuthProvider(DomHttpBasicAuth.newInstance("ditto","wrongpw))
            .build();

and call the count method:

this.searchHandle = this.restclient.getSearchHandle();
this.searchHandle.count().then(r => {
     console.log(r);
    },e => {
      console.log(e); // this returns undefined
    })

... HTTP returns properly 401 - since I want to distinguish between HTTP errorcodes, I need to interpret the errorcode. But e is returned as undefined.

What do I miss?

Thomas
@thlandgraf
Copy link
Author

Moved to eclipse-ditto/ditto-clients#169

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant