@@ -239,7 +239,10 @@ func TestStreamableClientGETHandling(t *testing.T) {
239239 }{
240240 {http .StatusOK , "" },
241241 {http .StatusMethodNotAllowed , "" },
242- {http .StatusBadRequest , "standalone SSE" },
242+ // The client error status code is not treated as an error in non-strict
243+ // mode.
244+ {http .StatusNotFound , "" },
245+ {http .StatusInternalServerError , "standalone SSE" },
243246 }
244247
245248 for _ , test := range tests {
@@ -305,8 +308,11 @@ func TestStreamableClientStrictness(t *testing.T) {
305308 {"strict initialized" , true , http .StatusOK , http .StatusMethodNotAllowed , true },
306309 {"unstrict initialized" , false , http .StatusOK , http .StatusMethodNotAllowed , false },
307310 {"strict GET" , true , http .StatusAccepted , http .StatusNotFound , true },
311+ // The client error status code is not treated as an error in non-strict
312+ // mode.
308313 {"unstrict GET on StatusNotFound" , false , http .StatusOK , http .StatusNotFound , false },
309314 {"unstrict GET on StatusBadRequest" , false , http .StatusOK , http .StatusBadRequest , false },
315+ {"GET on InternlServerError" , false , http .StatusOK , http .StatusInternalServerError , true },
310316 }
311317 for _ , test := range tests {
312318 t .Run (test .label , func (t * testing.T ) {
0 commit comments