Closed cryptix closed 3 years ago
Wouldn't 404 be enough? (Also for JSON alias requests)
I don't like it (alias not set and page not found are two different things for me) but I guess it works.
Can we define that, tho?
alias not set and page not found are two different things for me
Yes, this makes a lot of sense. I think there are two things to define: (1) what the users sees if they open the alias URL in the browser, (2) the JSON response.
(1) doesn't need to be spec'd strictly (flexibility and variation is fine for humans) but (2) needs to be clearly defined since it's programmatic (flexibility and variation is generally not fine for computers). That's why I suggested 404, primarily thinking about (2).
The web endpoint schema only defines the happy route but not what to do when an error happens (i.e. alias undefined).
Maybe we could require a
status string
as well which should besuccessful
for known aliases and if it's not there can be anerror string
as well on the object.