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

Useful "404 Not Found" response is concealed from consumer #3

Open
Tolk-Haggard opened this issue Jun 18, 2015 · 3 comments
Open

Useful "404 Not Found" response is concealed from consumer #3

Tolk-Haggard opened this issue Jun 18, 2015 · 3 comments

Comments

@Tolk-Haggard
Copy link

The ServiceInvoker unconditionally converts all 404 responses to the default return type (eg. 0, false, null) and in the worst case could be misleading but is at least masking potentially important feedback (eg. the server they are requesting does not exist because of a typo in their code).

A comment in the code does attempt to explain this behavior but it still seems concerning (ie. are we trying to cover up an issue that should be corrected in the v2 APIs?):
"This logic is necessary to prevent exceptions from being thrown when a resource is not found due to bad data in the system."

@rpierry
Copy link
Contributor

rpierry commented Jun 23, 2015

We found instances where Groups/Data Centers would contain links to servers that no longer existed. I think you're right that the best course is to find and fix any data or API problems, but until that is done this seems like a reasonable approach.

Given that we're navigating internal links (vs building URLs), the exposed behavior to clients is just that things that return 404 don't exist, which is as expected.

@Tolk-Haggard
Copy link
Author

Were the instances where Groups/Data Centers contain links to servers that no longer existed a frequent occurrence? And were the non-existent servers recent deletions (race condition) or just bad data somewhere?

I agree suppressing the 404s is better than regularly failing Group or Data Center actions because of stale data. Is it worth keeping this issue around until the bad data issues are resolved in the V2 APIs as a reminder to reevaluate 404 handling in the future?

@rpierry
Copy link
Contributor

rpierry commented Jun 23, 2015

They were frequent enough, though it could have been our test accounts. I don't think it was a race condition.

I think it makes sense to keep around.

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