chg: [localtTools:connectionRequest] Provide more info on exception
parent
5cac62a9b8
commit
7535cd2bdf
|
@ -304,7 +304,17 @@ class LocalToolsController extends AppController
|
|||
throw new MethodNotAllowedException(__('No local tool ID supplied.'));
|
||||
}
|
||||
$params['local_tool_id'] = $postParams['local_tool_id'];
|
||||
$encodingResult = $this->LocalTools->encodeConnection($params);
|
||||
try {
|
||||
$encodingResult = $this->LocalTools->encodeConnection($params);
|
||||
} catch (\Exception $e) {
|
||||
$encodingResult = [
|
||||
'inboxResult' => [
|
||||
'success' => false,
|
||||
'message' => __('Error while trying to encode connection'),
|
||||
'errors' => [$e->getMessage()],
|
||||
],
|
||||
];
|
||||
}
|
||||
$inboxResult = $encodingResult['inboxResult'];
|
||||
if ($inboxResult['success']) {
|
||||
if ($this->ParamHandler->isRest()) {
|
||||
|
|
|
@ -29,4 +29,3 @@
|
|||
]
|
||||
]);
|
||||
?>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue