Commit 4c8e637
authored
chore: postman attachment size exceeded error (#796)
## Problem
Currently, we don't check for attachment exceeded error for postman
step.
Postman
[guide](https://postman-v1.guides.gov.sg/email-api-guide/programmatic-email-api/send-email-api/attachments)
says that it is 2MB per attachment and 10MB in total, it seems like 2MB
is a soft limit and the 413 error only throws when the attachments
exceed 10MB in total.

## Solution
Check for the specific error code: `attachment_limit` and throw step
error for that.
<img width="895" alt="image"
src="https://github.com/user-attachments/assets/032a4a22-31b8-42a0-a0a9-77ce3a78b02f">
## Tests
- [x] Normal executions still work with postman
- [x] Attachments under the size of 10 MB works although it's slow
- [x] One attachment fails when it exceeds 10MB
- [x] Multiple attachment fails when they exceed 10MB1 parent 531c736 commit 4c8e637
File tree
3 files changed
+16
-3
lines changed- packages/backend/src/apps/postman/common
3 files changed
+16
-3
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
163 | | - | |
164 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
165 | 166 | | |
166 | 167 | | |
167 | 168 | | |
168 | 169 | | |
169 | 170 | | |
| 171 | + | |
170 | 172 | | |
171 | 173 | | |
172 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
105 | 107 | | |
106 | 108 | | |
107 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
108 | 118 | | |
109 | 119 | | |
110 | 120 | | |
| |||
0 commit comments