Commit db1c609
feat(errors): add OFFSET_TOO_LARGE code (#3)
* feat(errors): add OFFSET_TOO_LARGE code
an upstream change introduces a new HTTP 400 error code
`offset_too_large` returned by /api/v1/odds and /api/v1/odds/delta
when clients request offset > 500. Adding the canonical code here
so consumers branching on errcode strings can recognize it.
Mapped to ValidationError — clients treating the request as retriable
with a corrected offset can handle it the same way they handle
validation errors. Description points to cursor-based pagination and
since-advancement as the structured alternatives.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* style: wrap OFFSET_TOO_LARGE description to satisfy ruff E501
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent f9a597e commit db1c609
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| |||
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
118 | 123 | | |
119 | 124 | | |
120 | 125 | | |
| |||
150 | 155 | | |
151 | 156 | | |
152 | 157 | | |
| 158 | + | |
153 | 159 | | |
154 | 160 | | |
155 | 161 | | |
| |||
0 commit comments