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

API client (Go) returns error on 404 rather than nil result #1849

Open
mitchellh opened this issue Oct 24, 2016 · 0 comments
Open

API client (Go) returns error on 404 rather than nil result #1849

mitchellh opened this issue Oct 24, 2016 · 0 comments
Labels
theme/api HTTP API and SDK issues type/enhancement

Comments

@mitchellh
Copy link
Contributor

mitchellh commented Oct 24, 2016

Nomad version

Output from nomad version

0.4.1

Operating system and Environment details

macOS

Issue

When using the API client package in the api subdir, and making a request such as:

client.Jobs().Info("foo", nil)

where "foo" doesn't exist, it returns an error, rather than a nil job. This makes it difficult to differentiate between a real error and simply a non-existent job.

Reproduction steps

The above states it.

Nomad Server logs (if appropriate)

Not appropriate.

Nomad Client logs (if appropriate)

Not appropriate.

Job file (if appropriate)

None required.

@dadgar dadgar added theme/api HTTP API and SDK issues type/enhancement labels Nov 10, 2016
@dadgar dadgar added this to the v0.5.1 milestone Nov 10, 2016
@tgross tgross modified the milestones: near-term, unscheduled Jan 9, 2020
@tgross tgross removed this from the unscheduled milestone Feb 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/api HTTP API and SDK issues type/enhancement
Projects
None yet
Development

No branches or pull requests

3 participants