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

deleteNamespacedJob throws 'com.google.gson.JsonSyntaxException' exception. #1484

Closed
alextarasov-spot opened this issue Jan 7, 2021 · 2 comments

Comments

@alextarasov-spot
Copy link

I'm using BatchV1Api.deleteNamespacedJob method. This method returns V1Status object, the K8s OpenApi specifications says the same - the DELETE method of the /apis/batch/v1/namespaces/{namespace}/jobs/{name} API route returns io.k8s.apimachinery.pkg.apis.meta.v1.Status (K8s OpenAPI swagger)

When the deleteNamespacedJob method receives a response from the k8s API it, unexpectedly, receives a V1Job object:

image

and then it tries to deserialize the V1Job to the V1Status and fails with the 'com.google.gson.JsonSyntaxException' exception.

return json.deserialize(respBody, returnType);

@brendandburns
Copy link
Contributor

Please see the discussion in #86

This should be fixed at HEAD and will be part of the next (12.0.0) release.

@brendandburns
Copy link
Contributor

Closing since this is a duplicate of #86

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

2 participants