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

As a user, I want to get a 404 error if my request URL path does not match an API path #532

Open
tloubrieu-jpl opened this issue Sep 5, 2024 · 1 comment
Assignees
Labels
icebox p.should-have requirement the current issue is a requirement

Comments

@tloubrieu-jpl
Copy link
Member

Checked for duplicates

No - I haven't checked

πŸ§‘β€πŸ”¬ User Persona(s)

API user

πŸ’ͺ Motivation

...so that I can know where to fix my request.

so that the error behavior are consistent across the end-points provided.

πŸ“– Additional Details

For example request: https://pds.mcp.nasa.gov/api/search/1/classes/collections
should return a 404 error and not a 400 error.

Acceptance Criteria

Given
When I perform
Then I expect

βš™οΈ Engineering Details

No response

πŸŽ‰ I&T

No response

@alexdunnjpl
Copy link
Contributor

alexdunnjpl commented Sep 5, 2024

@tloubrieu-jpl what's the motivation for changing the status code?

Here, collection is a bad value provided to an enumeration in /classes/{enum}, not a bad route or an entity reference (i.e. id) which is not found in the available data). i.e. it isn't looking for something and not finding it, rather it's failing validation.

If the issue is a lack of description in the returned message, that can (should) be fixed, for sure.

EDIT: After checking, it should be clear from the return what the issue is:

BadRequestException: No PdsProductClass matches swagger name 'collections''. Valid names are: aip, ancillary, attribute-definition, browse, bundle, [...]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
icebox p.should-have requirement the current issue is a requirement
Projects
Status: ToDo
Development

No branches or pull requests

2 participants