--
You received this message because you are subscribed to the Google Groups "Pinboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pinboard-dev...@googlegroups.com.
To post to this group, send email to pinboa...@googlegroups.com.
Visit this group at http://groups.google.com/group/pinboard-dev?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
I don't like the idea of shoehorning stuff into HTTP error codes when
there's not an obvious mapping. In the example you give (422
Unprocessable Entity) there would still need to be a meaningful error
message in the body of the response to give the client any clue about
what specifically had gone wrong.
In other cases, there is no meaningful error code to map to. For
example, a request to 'bookmarks/delta' will return a changeset since
a given timestamp. But if there are too many changes, it will return
an error that basically says 'you're too out of date, you need to
request everything'.
It's best to think of the HTTP error codes indicating transport
errors, and the JSON error codes indicating API errors. Even if
you're stubborn and ignore the HTTP status codes altogether, you
should do fine as long as you're checking JSON errors.
I don't think multiple throttle headers are a good idea. It adds
complexity for no clear benefit. A client can always try different
API calls and back off if they're consistently throttled.
This kind of detail would create an illusion of stability where I
don't want one. I meant it when I wrote "Rate limits can change
without warning"!
If the request was understood by the API but something went wrong while performing the request, a 200 is okay.
200 OK - Everything worked as expected.
400 Bad Request - Often missing a required parameter.
401 Unauthorized - No valid API key provided.
402 Request Failed - Parameters were valid but request failed.
404 Not Found - The requested item doesn't exist.
500, 502, 503, 504 Server errors - something went wrong on Stripe's end.
--
You received this message because you are subscribed to the Google Groups "Pinboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pinboard-dev...@googlegroups.com.
To post to this group, send email to pinboa...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Pinboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pinboard-dev...@googlegroups.com.
To post to this group, send email to pinboa...@googlegroups.com.
Visit this group at http://groups.google.com/group/pinboard-dev?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
------------------------------------------------------------------------
Stephen Darlington (www.zx81.org.uk)
"I blame sex and paper for most of our current problems"
------------------------------------------------------------------------