Skip to content

Commit 8c7d27b

Browse files
omarmciverCopilot
andauthored
Update templates/base/http-clients/fetch-http-client.ejs
Co-authored-by: Copilot <[email protected]>
1 parent 837a381 commit 8c7d27b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

templates/base/http-clients/fetch-http-client.ejs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,9 @@ export class HttpClient<SecurityDataType = unknown> {
231231
}
232232

233233
// Prevent mutation of Response properties (ESM safety)
234-
return false;
234+
throw new Error(
235+
`Cannot set property '${String(prop)}' on HttpResponse: only 'data' and 'error' can be set.`
236+
);
235237
}
236238
}) as HttpResponse<T, E>;
237239

0 commit comments

Comments
 (0)