- Notifications
You must be signed in to change notification settings - Fork701
Commit09703a1
authored
## DescriptionThis PR parses `request_id` from the response of Notion API requests in`errors.ts` and includes them in the logger log lines in `Client.ts`.The idea is to encourage providing these in issue reports to Notion, sosupport teams can more easily debug issues.## How was this change tested?- [ ] Automated test (unit, integration, etc.)- [x] Manual test (provide reproducible testing steps below)Manually tested a failing request and a succeeding request and confirmedthe `request_id` is included in the log lines for both.## Screenshots```ts@notionhq/client warn: request fail { code: 'unauthorized', message: 'API token is invalid.', requestId: '83843712-fa08-452b-9282-0c9dcbdcb51f'}``````tsQuerying database...@notionhq/client info: request start { method: 'post', path: 'data_sources/bb1734fe-3d6c-44e1-8984-9525023c482f/query'}@notionhq/client info: request success { method: 'post', path: 'data_sources/bb1734fe-3d6c-44e1-8984-9525023c482f/query', requestId: '895abceb-15a0-47e0-91d3-84c26dfd3749'}```
1 parentc1fc444 commit09703a1
2 files changed
+27
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
| 181 | + | |
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
276 | 282 | | |
277 | 283 | | |
278 | 284 | | |
| |||
283 | 289 | | |
284 | 290 | | |
285 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
286 | 295 | | |
287 | 296 | | |
288 | 297 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
| |||
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
| 142 | + | |
141 | 143 | | |
142 | 144 | | |
143 | | - | |
| 145 | + | |
| 146 | + | |
144 | 147 | | |
145 | 148 | | |
146 | 149 | | |
147 | 150 | | |
148 | 151 | | |
| 152 | + | |
149 | 153 | | |
150 | 154 | | |
151 | 155 | | |
| |||
199 | 203 | | |
200 | 204 | | |
201 | 205 | | |
| 206 | + | |
202 | 207 | | |
203 | 208 | | |
204 | 209 | | |
| |||
231 | 236 | | |
232 | 237 | | |
233 | 238 | | |
| 239 | + | |
234 | 240 | | |
235 | 241 | | |
236 | 242 | | |
| |||
250 | 256 | | |
251 | 257 | | |
252 | 258 | | |
| 259 | + | |
253 | 260 | | |
254 | 261 | | |
255 | 262 | | |
| |||
265 | 272 | | |
266 | 273 | | |
267 | 274 | | |
| 275 | + | |
268 | 276 | | |
269 | 277 | | |
270 | 278 | | |
| |||
286 | 294 | | |
287 | 295 | | |
288 | 296 | | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
289 | 302 | | |
290 | 303 | | |
291 | 304 | | |
292 | 305 | | |
293 | | - | |
| 306 | + | |
| 307 | + | |
294 | 308 | | |
295 | 309 | | |
296 | 310 | | |
| |||
0 commit comments
Comments
(0)