Skip to content

Conversation

@appujet
Copy link

@appujet appujet commented Jun 25, 2025

Commit Message

fix: ensure Content-Type header always set in JsonResponse

Fix header merging logic preventing interaction responses

PR Description

Problem: interactions failing with JsonResponse class

Root Cause: Header initialization bug - when init object passed, || operator ignored JSON content-type header

Fix: Use object spread to properly merge headers while ensuring Content-Type is always set

## Commit Message

```
fix: ensure Content-Type header always set in JsonResponse

Fix header merging logic preventing Discord interaction responses
```

## PR Description

**Problem:** Discord interactions failing with `JsonResponse` class

**Root Cause:** Header initialization bug - when `init` object passed, `||` operator ignored JSON content-type header

**Fix:** Use object spread to properly merge headers while ensuring Content-Type is always set
@appujet
Copy link
Author

appujet commented Jun 25, 2025

image

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.

1 participant