You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to simulate an error using wrong is_unique an explicit error should I return
<br /> <b>Fatal error</b>: Uncaught CodeIgniter\Format\Exceptions\FormatException: Failed to parse json string, error: "{0}". in /var/www/html/sda-car/vendor/codeigniter4/framework/system/Format/Exceptions/FormatException.php:9 Stack trace: #0 /var/www/html/sda-car/vendor/codeigniter4/framework/system/Format/JSONFormatter.php(66): CodeIgniter\Format\Exceptions\FormatException::forInvalidJSON('Type is not sup...') #1 /var/www/html/sda-car/vendor/codeigniter4/framework/system/API/ResponseTrait.php(370): CodeIgniter\Format\JSONFormatter->format(Array) #2 /var/www/html/sda-car/vendor/codeigniter4/framework/system/API/ResponseTrait.php(123): CodeIgniter\Debug\Exceptions->format(Array) #3 /var/www/html/sda-car/vendor/codeigniter4/framework/system/Debug/Exceptions.php(164): CodeIgniter\Debug\Exceptions->respond(Array, 500) #4 [internal function]: CodeIgniter\Debug\Exceptions->exceptionHandler(Object(ErrorException)) #5 {main} thrown in <b>/var/www/html/sda-car/vendor/codeigniter4/framework/system/Format/Exceptions/FormatException.php</b> on line <b>9</b><br /> { "title": "ErrorException", "type": "ErrorException", "code": 500, "message": "Uncaught CodeIgniter\\Format\\Exceptions\\FormatException: Failed to parse json string, error: \"{0}\". in /var/www/html/sda-car/vendor/codeigniter4/framework/system/Format/Exceptions/FormatException.php:9\nStack trace:\n#0 /var/www/html/sda-car/vendor/codeigniter4/framework/system/Format/JSONFormatter.php(66): CodeIgniter\\Format\\Exceptions\\FormatException::forInvalidJSON('Type is not sup...')\n#1 /var/www/html/sda-car/vendor/codeigniter4/framework/system/API/ResponseTrait.php(370): CodeIgniter\\Format\\JSONFormatter->format(Array)\n#2 /var/www/html/sda-car/vendor/codeigniter4/framework/system/API/ResponseTrait.php(123): CodeIgniter\\Debug\\Exceptions->format(Array)\n#3 /var/www/html/sda-car/vendor/codeigniter4/framework/system/Debug/Exceptions.php(164): CodeIgniter\\Debug\\Exceptions->respond(Array, 500)\n#4 [internal function]: CodeIgniter\\Debug\\Exceptions->exceptionHandler(Object(ErrorException))\n#5 {main}\n thrown", "file": "/var/www/html/sda-car/vendor/codeigniter4/framework/system/Format/Exceptions/FormatException.php", "line": 9, "trace": [ { "function": "shutdownHandler", "class": "CodeIgniter\\Debug\\Exceptions", "type": "->", "args": [] } ] }
But here is the error that is returned following this error,
This error but returned for all the postgreesql errors for example during a form I was sending a string, while my column was a column of type number, so it is not possible but instead to have an explicit error it made me the same mistake
The text was updated successfully, but these errors were encountered:
Your issue needs to be formatted so as to be readable, please.
You could use pastebin, or else formatting code in the post, from the toolstrip.
You might also explain your issue better, as your description is hard to follow.
Thanks
Hello, there is a concern about any errors from postgresql
$validation->setRules([ 'utilisateur' => [ 'rules' => 'required|is_unique[fake]', 'label' => 'Nom d\'utilisateur', 'errors' => [ 'is_unique' => 'Un nom d\'utilisateur identique existe déjà' ] ] ]);
I'm trying to simulate an error using wrong is_unique an explicit error should I return
<br /> <b>Fatal error</b>: Uncaught CodeIgniter\Format\Exceptions\FormatException: Failed to parse json string, error: "{0}". in /var/www/html/sda-car/vendor/codeigniter4/framework/system/Format/Exceptions/FormatException.php:9 Stack trace: #0 /var/www/html/sda-car/vendor/codeigniter4/framework/system/Format/JSONFormatter.php(66): CodeIgniter\Format\Exceptions\FormatException::forInvalidJSON('Type is not sup...') #1 /var/www/html/sda-car/vendor/codeigniter4/framework/system/API/ResponseTrait.php(370): CodeIgniter\Format\JSONFormatter->format(Array) #2 /var/www/html/sda-car/vendor/codeigniter4/framework/system/API/ResponseTrait.php(123): CodeIgniter\Debug\Exceptions->format(Array) #3 /var/www/html/sda-car/vendor/codeigniter4/framework/system/Debug/Exceptions.php(164): CodeIgniter\Debug\Exceptions->respond(Array, 500) #4 [internal function]: CodeIgniter\Debug\Exceptions->exceptionHandler(Object(ErrorException)) #5 {main} thrown in <b>/var/www/html/sda-car/vendor/codeigniter4/framework/system/Format/Exceptions/FormatException.php</b> on line <b>9</b><br /> { "title": "ErrorException", "type": "ErrorException", "code": 500, "message": "Uncaught CodeIgniter\\Format\\Exceptions\\FormatException: Failed to parse json string, error: \"{0}\". in /var/www/html/sda-car/vendor/codeigniter4/framework/system/Format/Exceptions/FormatException.php:9\nStack trace:\n#0 /var/www/html/sda-car/vendor/codeigniter4/framework/system/Format/JSONFormatter.php(66): CodeIgniter\\Format\\Exceptions\\FormatException::forInvalidJSON('Type is not sup...')\n#1 /var/www/html/sda-car/vendor/codeigniter4/framework/system/API/ResponseTrait.php(370): CodeIgniter\\Format\\JSONFormatter->format(Array)\n#2 /var/www/html/sda-car/vendor/codeigniter4/framework/system/API/ResponseTrait.php(123): CodeIgniter\\Debug\\Exceptions->format(Array)\n#3 /var/www/html/sda-car/vendor/codeigniter4/framework/system/Debug/Exceptions.php(164): CodeIgniter\\Debug\\Exceptions->respond(Array, 500)\n#4 [internal function]: CodeIgniter\\Debug\\Exceptions->exceptionHandler(Object(ErrorException))\n#5 {main}\n thrown", "file": "/var/www/html/sda-car/vendor/codeigniter4/framework/system/Format/Exceptions/FormatException.php", "line": 9, "trace": [ { "function": "shutdownHandler", "class": "CodeIgniter\\Debug\\Exceptions", "type": "->", "args": [] } ] }
But here is the error that is returned following this error,
This error but returned for all the postgreesql errors for example during a form I was sending a string, while my column was a column of type number, so it is not possible but instead to have an explicit error it made me the same mistake
The text was updated successfully, but these errors were encountered: