Closed PavelFil closed 1 year ago
What OS, PHP and client version do you use? I cannot reproduce the problem with PHP 8.1.2 and tarantool/client v0.10.0, on my environment your example script outputs a full trace, including the initial line that caused the error:
PHP Fatal error: Uncaught Tarantool\Client\Exception\RequestFailed: Duplicate key exists in unique index "primary" in space "test" with old tuple - ["info"] and new tuple - ["info"] in .../tarantool-php/client/src/Exception/RequestFailed.php:32
Stack trace:
#0 .../tarantool-php/client/src/Handler/DefaultHandler.php(48): Tarantool\Client\Exception\RequestFailed::fromErrorResponse()
#1 .../tarantool-php/client/src/Handler/MiddlewareHandler.php(76): Tarantool\Client\Handler\DefaultHandler->handle()
#2 .../tarantool-php/client/src/Middleware/AuthenticationMiddleware.php(41): Tarantool\Client\Handler\MiddlewareHandler->handle()
#3 .../tarantool-php/client/src/Handler/MiddlewareHandler.php(82): Tarantool\Client\Middleware\AuthenticationMiddleware->process()
#4 .../tarantool-php/client/src/Schema/Space.php(77): Tarantool\Client\Handler\MiddlewareHandler->handle()
#5 .../tarantool-php/client/test.php(21): Tarantool\Client\Schema\Space->insert()
#6 {main}
thrown in .../tarantool-php/client/src/Exception/RequestFailed.php on line 32
It looks like your error output is cut off, I don't see {main}
in your version.
I tested on PHP v7.4.3. But after update to 8.1.13 I see the same trace log. I think we can close the issue.
Exceptions doesn't display full trace. It's hard to understand which code throws the exception.
Try to run:
You will receive:
There is no information about the row
$space->insert(['info']);
which causes the error. I wanna see full trace log in debug message.