Commit 85d1a98
committed
og-image: Handle 404 errors from avatar downloads gracefully
Some of our users appear to have avatar URLs like `https://private-avatars.githubusercontent.com/u/123095?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTEiLCJleHAiOjE3MzQ1MjkwMjAsIm5iZiI6MTczNDUyNzgyMCwicGF0aCI6Ii91LzEyMzA5NSJ9.qPHLwlZHda1ApuLzL5FfADxTiOsNjpp85IGvljRx9bM&v=4&s=64` which result in 404 errors when attempting to download them. This commit adjusts the code to log a warning in such cases and then show the author name without an avatar instead.1 parent fba06d2 commit 85d1a98
2 files changed
+20
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
252 | 253 | | |
253 | 254 | | |
254 | 255 | | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
| 256 | + | |
| 257 | + | |
260 | 258 | | |
261 | 259 | | |
262 | | - | |
263 | | - | |
264 | | - | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
265 | 271 | | |
266 | 272 | | |
267 | | - | |
| 273 | + | |
| 274 | + | |
268 | 275 | | |
269 | 276 | | |
270 | 277 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
286 | | - | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
287 | 290 | | |
288 | 291 | | |
289 | 292 | | |
| |||
0 commit comments