Improve Windows automation reliability#9
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| export const submitInsightRequest = async (payload: FormData) => { | ||
| const response = await axios.post('/api/insights', payload, { | ||
| headers: { 'Content-Type': 'multipart/form-data' }, | ||
| }); | ||
| return { data: insightsSchema.parse(response.data.insights), raw: response.data }; | ||
| }; | ||
|
|
||
| export const submitComparisonRequest = async (payload: FormData) => { | ||
| const response = await axios.post('/api/compare', payload, { | ||
| headers: { 'Content-Type': 'multipart/form-data' }, |
There was a problem hiding this comment.
Avoid hard‑coding multipart Content-Type header
Both form helpers send FormData while explicitly setting headers: { 'Content-Type': 'multipart/form-data' }. When the browser sees this override it does not add the required boundary parameter, so Multer on the server will reject the upload with “multipart boundary not found” and the insight/comparison flows never succeed. Dropping the header lets Axios/XHR generate the correct boundary automatically.
Useful? React with 👍 / 👎.
Summary
Testing
Codex Task