Commit 80a88bf
committed
fix: add defensive checks in storage resolvers instead of non-null assertions
Replace cdn! and credential! non-null assertions with explicit error
messages in both bucket-provisioner-resolver.ts and presigned-url-resolver.ts.
If CDN env vars are missing, the resolvers now throw clear errors explaining
which variables to set, instead of silently passing undefined to S3 clients.1 parent fe60f7b commit 80a88bf
2 files changed
Lines changed: 43 additions & 8 deletions
Lines changed: 18 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
34 | 48 | | |
35 | 49 | | |
36 | 50 | | |
| |||
39 | 53 | | |
40 | 54 | | |
41 | 55 | | |
42 | | - | |
43 | | - | |
| 56 | + | |
| 57 | + | |
44 | 58 | | |
45 | 59 | | |
46 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
34 | 55 | | |
35 | 56 | | |
36 | 57 | | |
37 | 58 | | |
38 | 59 | | |
39 | 60 | | |
40 | 61 | | |
41 | | - | |
| 62 | + | |
42 | 63 | | |
43 | 64 | | |
44 | 65 | | |
45 | 66 | | |
46 | 67 | | |
47 | | - | |
| 68 | + | |
48 | 69 | | |
49 | 70 | | |
50 | 71 | | |
| |||
0 commit comments