Closed joanhey closed 10 months ago
Added to show Workerman info and errors (if exist) in the test. Before we see blind errors, without any info.
Before: https://github.com/walkor/workerman/actions/runs/5549327537/jobs/10133294775 After: https://github.com/walkor/workerman/actions/runs/5549366572/jobs/10133376678
It's easy to fix the test. But this time we want the error information.
I think we cannot limit it to string|Response, as numbers or null or other classes( for example Workerman\Psr7\Response
) that can be converted to strings can be encoded.
We cannot limit the types of TcpConnection because data has a wider range of data types.
Update: investigating why the
/session
test fail !!Update: the
Session->pull()
return mixed, thinking about what will happen if return anarray
, theencode()
will not show it corretly.I think that need to be forced to
string|Response
orstring|Stringable
theencode()
,send()
andclose()
methods and perhaps in TcpConnection too. :thinking: Check https://3v4l.org/Og7d6 Also we need to catch the error and send a 500, now only stop and send nothing.@walkor what do you think ?