swagger-api / swagger-api/swagger-codegen
[JAVA]io.swagger.client.ApiException: Not Found
Open
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
I have encounter this error when ever a respond code 404 returns.
Please advice on the following errors.
<-- HTTP/1.1 404 Not Found (444ms)
Date: Wed, 14 Nov 2018 07:10:58 GMT
Content-Type: application/json
Transfer-Encoding: chunked
OkHttp-Sent-Millis: 1542179458658
OkHttp-Received-Millis: 1542179458870
{"errors":[{"code":"404","message":"Entity not found."}]}
<-- END HTTP (57-byte body)
io.swagger.client.ApiException: Not Found
at io.swagger.client.ApiClient.handleResponse(ApiClient.java:925)
at io.swagger.client.ApiClient.execute(ApiClient.java:841)
at io.swagger.client.api.EntitiesApi.outboundDataEntitiesWithHttpInfo(EntitiesApi.java:191)
at uen.apex.UenApexConnector.getEntities(UenApexConnector.java:423)
at uen.apex.UenApexConnector.main(UenApexConnector.java:103)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Swagger-codegen version
2.3.1 (current stable)
Swagger declaration file content or url
Command line used for generation
java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate
-i inputfile.yaml
-l java\
Steps to reproduce
Whenever a 404 status code is return
Related issues/PRs
Suggest a fix/enhancement
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with ApiClient.handleResponse(ApiClient.java:925) and the generated EntitiesApi.outboundDataEntitiesWithHttpInfo call shown in the stack trace. Reproduce the 404 using the supplied inputfile.yaml and generated Java client, then clarify whether the reported exception is expected or what alternative handling is required; the issue does not currently define a fix or completion condition.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100