We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d264d93 commit aaa5cd8Copy full SHA for aaa5cd8
JsonRpcError.php
@@ -26,10 +26,14 @@ public function __construct(\Exception $exception)
26
{
27
$this->code = $exception->getCode();
28
$this->message = $this->getExceptionMessage($exception);
29
+ $this->data = [];
30
31
if (defined('YII_DEBUG') && YII_DEBUG) {
32
$this->data = $this->convertExceptionToArray($exception);
33
}
34
+
35
+ // We need to provide client with an original error message
36
+ $this->data['human_message'] = ($exception->getPrevious()) ? $exception->getPrevious()->getMessage() : $exception->getMessage();
37
38
39
/**
0 commit comments