API listEndpoint Failing on JSON Deserialize

We make a call to HuggingFace to list the endpoints we have defined. This used to work and suddenly is broken.

Below is the stack trace segment for where it happens.
I observe that the call to H.F. API gets made and has succeeded but upon deserializing the JSON body it fails.
Is this a know bug?
Is there a work around?
Help!! :slight_smile:

java.lang.IllegalArgumentException: The field scaleToZeroTimeout in the JSON string is not defined in the EndpointScaling properties. JSON: {“minReplica”:0,“maxReplica”:1,“scaleToZeroTimeout”:null}
at org.huggingface.client.model.EndpointScaling.validateJsonElement(EndpointScaling.java:178)
at org.huggingface.client.model.EndpointCompute.validateJsonElement(EndpointCompute.java:252)
at org.huggingface.client.model.EndpointWithStatus.validateJsonElement(EndpointWithStatus.java:342)
at org.huggingface.client.model.EndpointWithStatusList.validateJsonElement(EndpointWithStatusList.java:179)
at org.huggingface.client.model.EndpointWithStatusList$CustomTypeAdapterFactory$1.read(EndpointWithStatusList.java:204)
at org.huggingface.client.model.EndpointWithStatusList$CustomTypeAdapterFactory$1.read(EndpointWithStatusList.java:194)
at org.huggingface.client.JSON.deserialize(JSON.java:179) [5 skipped]
at org.huggingface.client.ApiClient.deserialize(ApiClient.java:919)
at org.huggingface.client.ApiClient.handleResponse(ApiClient.java:1129)
at org.huggingface.client.ApiClient.execute(ApiClient.java:1053)
at org.huggingface.client.api.V2endpointApi.listEndpointWithHttpInfo(V2endpointApi.java:996)
at org.huggingface.client.api.V2endpointApi.listEndpoint(V2endpointApi.java:977)

Turns out https://api.endpoints.huggingface.cloud/openapi.json changed and now has the new field scaleToZeroTimeout in it. But the revision 0.1.0 did not increase.

Fixed.

Warning - There are errors in https://api.endpoints.huggingface.cloud/openapi.json and we have to hand-fix it before we can auto generate the API code.

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.