mfischbo / java-discogs-client

A java client for the public API of discogs.com
Apache License 2.0
1 stars 2 forks source link

ClientException on getRelease(long id) call #1

Closed rotzbouw closed 7 years ago

rotzbouw commented 7 years ago

Hi, getting the following exception when calling getRelease(long id). E.g. for id 1457086, but applies to many others as well.

net.fischboeck.discogs.ClientException: Can not deserialize instance of java.lang.String out of START_OBJECT token
 at [Source: java.io.BufferedInputStream@3e10dc6; line: 1, column: 409] (through reference chain: net.fischboeck.discogs.model.release.Release["series"]->java.util.ArrayList[0])
    at net.fischboeck.discogs.BaseOperations.doGetRequest(BaseOperations.java:99)
    at net.fischboeck.discogs.DatabaseOperations.getRelease(DatabaseOperations.java:62)

Any help would be appreciated, thanks!

mfischbo commented 7 years ago

Hi! Thanks for your report It seems that the response the API sends back has changed. I'm going to add the new fields soon. Since the client is in early development I wanted it to fail fast. However I'm considering to behave a little more robust since the discogs API tends to change from time to time and errors like this should be ignored then.

mfischbo commented 7 years ago

Given the provided release id I was able to reproduce and fix the issue.