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

Throws exception when "result" doesn't appear in the response jsonObject #22

Open
cuteonion opened this issue Nov 18, 2017 · 0 comments

Comments

@cuteonion
Copy link

When I run the method client.getJobResult(jobId),
the response is
{ "duration": "22.278 secs", "classPath": "events_introduction", "startTime": "2017-11-05T21:56:03.104+08:00", "context": "43ec02b5-events_introduction", "status": "FINISHED", "jobId": "6372e979-3a4c-4b4b-b155-8815dcc3310f" }
however, the 'result' field is missing. But I don't think the parser should throw an exception. I traced the code and found that if the status is "FINISHED" then all keys like "result" are required, otherwise it throws an exception.
Maybe we can just set field's value as null.
This scenario may be common when we try to get a job which was run long time ago.
I don't think this is a bug. But we can truly make it more friendly?

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

1 participant