samczsun / Skype4J

Skype API written in Java. Does not support P2P chats
Apache License 2.0
145 stars 48 forks source link

The nothing went wrong exception #131

Open Tsuser1 opened 8 years ago

Tsuser1 commented 8 years ago

So I got the most strange of errors while programming my bot to accept contact requests...

Exception in thread "main" com.samczsun.skype4j.exceptions.ConnectionException: 
        Cause: While authorizing contact
        Response: 201 Created
        Begin Message 

{"status":{"code":20100,"text":"Contact Request Accepted"}}

        End message

    at com.samczsun.skype4j.internal.ExceptionHandler.generateException(ExceptionHandler.java:101)
    at com.samczsun.skype4j.internal.Endpoints$EndpointConnection.connect(Endpoints.java:389)
    at com.samczsun.skype4j.internal.Endpoints$EndpointConnection.put(Endpoints.java:307)
    at com.samczsun.skype4j.internal.participants.info.ContactImpl.authorize(ContactImpl.java:196)
    at com.tsuserMainframe.main.Main.main(Main.java:27)

And I tracked it back to here...

public void authorize() throws ConnectionException {
        Endpoints.AUTHORIZE_CONTACT.open(skype, this.username).expect(200, "While authorizing contact").put();
        updateContactInfo();
    }

I think the expected code is incorrect.