@databallr/sdk 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +8 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -37,9 +37,14 @@ const standings = await dbr.get("/v1/nba/standings", { query: { season: 2026 } }
37
37
  `code` is UPPER_SNAKE for errors any call can hit: `INVALID_TOKEN` (401),
38
38
  `INSUFFICIENT_SCOPE` (403), `RATE_LIMITED` (429), `UPSTREAM_ERROR` (502),
39
39
  or `HTTP_ERROR` when the body is not the API's error envelope. An
40
- operation's own errors (bad input, nothing found) may still carry a
41
- sentence as `code` until the API moves them to codes, so branch on
42
- `status` for those. The API does not send `type` yet, so it is
40
+ operation's own errors (bad input, nothing found) carry one code per
41
+ status: `INVALID_REQUEST` (400), `UNAUTHORIZED` (401), `FORBIDDEN` (403),
42
+ `NOT_FOUND` (404), `METHOD_NOT_ALLOWED` (405), `CONFLICT` (409),
43
+ `BODY_TOO_LARGE` (413), `RATE_LIMITED` (429), `INTERNAL_ERROR` (500),
44
+ `UPSTREAM_ERROR` (502), `SERVICE_UNAVAILABLE` (503). The reason
45
+ (`"Valid user_id is required"`) is the error's `message`; it is written
46
+ for people and can change, so branch on `code`. The API does not send
47
+ `type` yet, so it is
43
48
  `undefined` and `retryable` is `false`; the client's own retries do not
44
49
  depend on them. Network failures throw
45
50
  `DataballrConnectionError`, and timeouts its subclass
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@databallr/sdk",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "TypeScript client for the databallr API (NBA and WNBA stats, SixRings)",
5
5
  "license": "MIT",
6
6
  "repository": {