gitlab4j-api
gitlab4j-api copied to clipboard
org.gitlab4j.api.JobApi.getJobsForPipeline throw unexpected ProcessingException
Background
We are getting jobs from pipeline, but it often throw ProcessingException
. I think this is not expected exception which you design. I read part of your source code, and the expected exception is GitlabApiException.
SDK Version: 5.0.1
What I want to know and resolve
I want to resolve this exception to assure request is almost steady. I want to know what corner case it trigger.
Details
Full stacktrace:
javax.ws.rs.ProcessingException: Error reading entity from input stream.
at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:900)
at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:845)
at org.glassfish.jersey.client.ClientResponse.readEntity(ClientResponse.java:340)
at org.glassfish.jersey.client.InboundJaxrsResponse$2.call(InboundJaxrsResponse.java:104)
at org.glassfish.jersey.internal.Errors.process(Errors.java:292)
at org.glassfish.jersey.internal.Errors.process(Errors.java:274)
at org.glassfish.jersey.internal.Errors.process(Errors.java:205)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:365)
at org.glassfish.jersey.client.InboundJaxrsResponse.runInScopeIfPossible(InboundJaxrsResponse.java:244)
at org.glassfish.jersey.client.InboundJaxrsResponse.readEntity(InboundJaxrsResponse.java:101)
at org.gitlab4j.api.JobApi.getJobsForPipeline(JobApi.java:[145](https://git.bilibili.co/android/andruid/-/jobs/11255779#L145))
In version 4.14.22, this exception occurs when the branch information of the code repository is obtained.
In version 4.14.22, this exception occurs when the branch information of the code repository is obtained.
My current sdk version is 5.0.1. I have also doubted version issue, and upgrade from 4.x to latest version.
The method in question:
https://github.com/gitlab4j/gitlab4j-api/blob/2f584fb781a7492013c26fa11df19fea7574cf47/src/main/java/org/gitlab4j/api/JobApi.java#L131-L145
When you have a failing case with this lib, can you use an other tool (curl
or postman
) and redo the same HTTP call:
GET /projects/:id/pipelines/:pipeline_id/jobs
And share the returned JSON?