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

format filtering returns everything when passed an unknown format #118

Open
andybak opened this issue Jan 18, 2025 · 5 comments
Open

format filtering returns everything when passed an unknown format #118

andybak opened this issue Jan 18, 2025 · 5 comments
Assignees

Comments

@andybak
Copy link
Contributor

andybak commented Jan 18, 2025

https://api.icosa.gallery/v1/assets?format=asd

To discuss - what do we want to happen here?

@jamesrampton
Copy link
Contributor

Perhaps we should return nothing. This is the behaviour for keywords, for example and it makes sense. However, the way it's been coded is to explicitly return all (i.e, it's not an oversight). I don't recall what our thinking around this originally was (nor should I have to - more comments!) so I'm happy to go with whatever you feel works best.

@andybak
Copy link
Contributor Author

andybak commented Jan 20, 2025

It's either return nothing or return a 40x

I lean towards the latter.

@jamesrampton
Copy link
Contributor

I'm leaning towards the former! This is a filter, not the base URL. I think a 404 would be confusing for clients. Imagine the case that we 404 for a keyword search. That wouldn't make much sense.

Happy to be convinced though.

@andybak
Copy link
Contributor Author

andybak commented Jan 20, 2025

I was actually thinking more of "400 Bad Request" - does that change things, at all?

@jamesrampton
Copy link
Contributor

That changes everything :^) I've implemented this.

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