Skip to content

Commit a48881a

Browse files
committed
fix(sap_concur): stop swallowing upload response-read failures
The upload route caught every error from the bounded response read and continued down the success path, so a size-limit breach or a stream failure surfaced as an upstream success with a null or header-only body. Concur returns Content-Length: 0 on a successful image-only upload, and readResponseTextWithLimit already returns an empty string for that without throwing, so dropping the catch keeps the legitimate empty-body case working while letting real read failures reach the route's handler.
1 parent eb4a3d8 commit a48881a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • apps/sim/app/api/tools/sap_concur/upload

apps/sim/app/api/tools/sap_concur/upload/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ async function postMultipart(
198198
const raw = await readResponseTextWithLimit(response, {
199199
maxBytes: MAX_JSON_API_RESPONSE_BYTES,
200200
label: 'Concur upload response',
201-
}).catch(() => '')
201+
})
202202
let parsed: unknown = null
203203
if (raw.length > 0) {
204204
try {

0 commit comments

Comments
 (0)