Commit 705622c
Fix crash in receiveEmail when no R2 bucket binding is found
If no R2 bucket is configured via emailRouting.targetBucket and no
bucket binding exists in the environment, the email handler would
crash with a TypeError when calling bucket.put() on undefined.
This adds a guard that throws a descriptive error message instead.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 811c439 commit 705622c
2 files changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
49 | 55 | | |
50 | 56 | | |
51 | 57 | | |
| |||
0 commit comments