Commit e10e113
authored
Fix: default to status 200 for non-empty DatastarResponse (Litestar) (#39)
Litestar's Stream base class defaults to status 201 when no status_code
is provided. Datastar's client-side fetch action (RC8) only processes
SSE responses with status 200 — non-200 responses are silently discarded:
// fetch.ts line 561
if (status !== 200) { dispose(); resolve(); return; }
The empty-content case already defaults to 204. This adds the same
pattern for the non-empty case: default to 200 when the caller doesn't
specify a status code.1 parent 43f32ed commit e10e113
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
0 commit comments