Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

Document error for obsolete API version #449

Closed
ckarlof opened this issue Dec 17, 2013 · 12 comments
Closed

Document error for obsolete API version #449

ckarlof opened this issue Dec 17, 2013 · 12 comments

Comments

@ckarlof
Copy link
Contributor

ckarlof commented Dec 17, 2013

This will allow us to rev our API and retire old versions without breaking older native clients in indecipherable ways (as long as they handle this error!).

@rfk
Copy link
Contributor

rfk commented Dec 17, 2013

Some additional context in https://bugzilla.mozilla.org/show_bug.cgi?id=951306

@ckarlof
Copy link
Contributor Author

ckarlof commented Dec 18, 2013

I propose "410 Gone" for an obsolete API endpoint.

@dannycoates
Copy link
Contributor

Is there a specific reason we can't just use 404? Otherwise we need to keep track of obsolete routes instead of just deleting them.

@ckarlof
Copy link
Contributor Author

ckarlof commented Dec 18, 2013

I'm fine with 404.

@warner
Copy link
Contributor

warner commented Jan 3, 2014

As we talked about in person, I'm nervous about using 404 for this, because a variety of transient problems (server downtime, DNS failures, client-side network borkage) could provoke the client to tell our user "you need to upgrade your browser" instead of "please try again later". Confusing and annoying. So I'd be a lot happier with something like 410 Gone along with a URL that lists the currently relevant API versions and known-new-enough client versions.

It does mean we have to keep something for v1 around forever, but I'm hoping that it can be a single wildcard-route for anything that starts with /v1/, and the long-term cost will be like three lines per removed API version.

@warner
Copy link
Contributor

warner commented Jan 3, 2014

So the proposal is:

410 Gone, error="Obsolete API", URL= pointer to a page with upgrade instructions

@ckarlof
Copy link
Contributor Author

ckarlof commented Jan 6, 2014

+1 to 410.

@ncalexan
Copy link
Member

ncalexan commented Jan 7, 2014

+1 to 410. Stick a fork in it.

@ncalexan
Copy link
Member

ncalexan commented Jan 7, 2014

Can we please clarify exactly which endpoints this is for? Issue suggests just /v1/auth/password, but this is generally useful.

@ckarlof
Copy link
Contributor Author

ckarlof commented Jan 7, 2014

Yes, I intended this error could be returned by any API call.

dannycoates added a commit to dannycoates/picl-idp that referenced this issue Jan 9, 2014
@dannycoates
Copy link
Contributor

You can now test the behavior against master with any url starting with /v0/

@ckarlof
Copy link
Contributor Author

ckarlof commented Jan 9, 2014

yay, closing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants