Closed JBorrow closed 7 months ago
TODO: CLI
CLI now done
@plaplant any thoughts on returning a 404 when we find no files v.s. just returning an empty list?
@JBorrow is the idea that the only thing to change would be a different return code (i.e., 404 vs. 200), but otherwise the rest is similar? I'm open to that, as long as the webserver makes it clear that the issue is specifically that no files matched the query. For me personally I typically associate a 404 error with "unclear user error", which might not be the most useful result in this case.
Yeah, I guess the question is in this scenario:
What should this code be?
I've already ran into a development and testing issue here where I thought I was finding zero results but actually I just mis-spelled the name of the endpoint...
I am going to merge this and then refactor the endpoint to return an empty list when nothing is found. That makes the most sense to me. It's not an error for no file to match a search constraint.
Fixes simonsobs/librarian#29