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

500 error on getJobDetails quartz #17

Open
jblayneyXpanxion opened this issue Jun 4, 2020 · 3 comments
Open

500 error on getJobDetails quartz #17

jblayneyXpanxion opened this issue Jun 4, 2020 · 3 comments

Comments

@jblayneyXpanxion
Copy link

Hey there, I don't have time to fix this so I figured I'd log some issues I found and some enhancement requests.

Calling /jobDetails/{quartzGroupName}/{quartzJobName}

For a job that doesn't exist returns a 500 error. I found the line it throws in the past, but can't recall - its pretty obvious - I think there is a filter that runs, then it calls .get(0) on the resulting structure which is empty, so it throws.

Also, {quartzGroupName} should now be made optional, and default to null. Internally, null will use the QuartzDefaultGroup, so if unspecified in the API/swagger would default to null=defaultGroup.

Ideally the API would return 404 with a response body indicating if the quartzGroupName was not found or if the quartzJobName was not found.

@chrisgleissner
Copy link
Owner

chrisgleissner commented Jun 4, 2020 via email

@jblayneyXpanxion
Copy link
Author

Good point, since the group name is on the uri you can't really make it blank. I like using "default" for that.

A couple other thoughts to add if you're open to more ideas. Both may / may-not be manageable:

  • If its possible to get a list of registered quartz groups, this could be handled internally and endpoint changed to /jobDetails/{quartzJobName} - where the job name is internally searched within each registered quartz group.
  • Could also change the group and job name to a single resource within the uri - for example:
    /jobDetails/{quartzGroupName}:{quartzJobName} would be used to specify the group - eg: /jobDetails/default:{quartzJobName} would be equal or a subset-lookup similar to /jobDetails/quartzJobName. This sort of endpoint might enable making group name optional, when unspecified the service would handle trying to find the job within registered quartz groups.

@chrisgleissner
Copy link
Owner

Hi,

thanks for the two suggestions in your last post, good ideas. And this would also ensure backwards compatibility of the API. I've been quite busy so have not yet had the chance to work on this.

Thanks

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