Skip to content

Conversation

@AJFrio
Copy link
Owner

@AJFrio AJFrio commented Nov 12, 2025

Update architecture for + testing + security

@AJFrio AJFrio merged commit 9a43a8d into main Nov 12, 2025
1 check passed
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +69 to +74
const response = await fetch(finalConfig.url, {
method: finalConfig.method || 'GET',
headers: finalConfig.headers,
body: finalConfig.body ? JSON.stringify(finalConfig.body) : undefined,
...finalConfig
})

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Serialize request body before calling fetch

The new API client attempts to JSON‑encode request bodies but then spreads finalConfig after the stringification step (fetch(finalConfig.url, { …, body: finalConfig.body ? JSON.stringify(finalConfig.body) : undefined, ...finalConfig })). Because the spread comes last, any object supplied in finalConfig.body overwrites the stringified version, so fetch receives a plain object and throws a runtime error for every POST/PUT call with a JSON payload. The spread should occur before the manual serialization or the code should assign the encoded body after the spread.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants