HTTP status codes
The three-digit result of a request. 2xx is success, 4xx means the client sent something wrong (400 bad input, 401 no valid token, 403 not allowed, 404 missing, 409 conflict, 429 rate limited), and 5xx means the server failed. A bad cursor is the client's fault, so it is a 400, never a 500.
Learn this concept
Lesson 2.8 · JSON HTTP handlers in GoUsed in exercises
Exercise 2.10 · GET /v1/restaurants with a cursor Exercise 2.12 · GET /v1/restaurants/{id}/menu in five queries Exercise 2.14 · POST /v1/menu/price: price a configured item Exercise 2.22 · GET /v1/restaurants: signed cursors Exercise 3.22 · POST /v1/auth/refresh: detect token reuse Exercise 4.20 · API request retry utilityRelatedJSON struct tags