-
Notifications
You must be signed in to change notification settings - Fork 490
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
Fix issue: Return 404 instead of 2xx codes for methods handling non-existent tasks#38 #69
base: main
Are you sure you want to change the base?
Fix issue: Return 404 instead of 2xx codes for methods handling non-existent tasks#38 #69
Conversation
…ds handling non-existent tasks
…ds handling non-existent tasks
…ds handling non-existent tasks
rest/src/main/java/com/netflix/conductor/rest/controllers/TaskResource.java
Show resolved
Hide resolved
Note that changing /poll and /poll/batch can break clients (since the expected codes were 200 with content if I get homework, and 204 without content if there was none). If you also want those methods to give 404, this change should be labeled as BREAKING CHANGE. |
@JCHacking, are you suggesting that we undo the code changes for |
No, I think it is more correct that if it fails to get a task it returns 404. But if you make this change you may have to change the client package as well and the SDKs in other languages. |
I don't think that for poll it is more correct to return 404. This could be correct if task definition is not known because in that case it would actually reflect a possible error condition. 204 means operation has no errors but returns no content which is much more correct and it would not break anything. |
You right |
I will revert the code to make the poll APIs return 204. |
…points handling non-existent tasks
Pull Request type
NOTE: Please remember to run
./gradlew spotlessApply
to fix any format violations.Changes in this PR
Describe the new behavior from this PR, and why it's needed
Issue #
Alternatives considered
Describe alternative implementation you have considered