Skip to content

Commit ebf1ab0

Browse files
committed
Improved JsonRpcError to have original error code handy.
1 parent 8c72ca0 commit ebf1ab0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

JsonRpcError.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public function __construct(\Exception $exception)
3939

4040
// We need to provide client with an original error message
4141
$this->data['human_message'] = ($exception->getPrevious()) ? $exception->getPrevious()->getMessage() : $exception->getMessage();
42+
$this->data['error_code'] = ($exception->getPrevious()) ? $exception->getPrevious()->getCode() : null;
4243
}
4344

4445
/**

0 commit comments

Comments
 (0)