Skip to content
Snippets Groups Projects
Commit a5a9d6b6 authored by Beatrycze Volk's avatar Beatrycze Volk
Browse files

Display error if API server responsed with incorrect code

parent ee948d6e
No related branches found
No related tags found
No related merge requests found
...@@ -115,6 +115,9 @@ class RecommenderController extends AbstractController ...@@ -115,6 +115,9 @@ class RecommenderController extends AbstractController
$this->cache->set('result_subject', $result->subject); $this->cache->set('result_subject', $result->subject);
$this->assignViewVariables(); $this->assignViewVariables();
} else {
$this->logger->error('Server response error: '.$response->getStatusCode());
$this->view->assign('error','Server response error: '.$response->getStatusCode());
} }
} catch (\Exception $e) { } catch (\Exception $e) {
$this->logger->error('Request error: '.$e->getMessage()); $this->logger->error('Request error: '.$e->getMessage());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment