Skip to content
Snippets Groups Projects
Commit 4b88b4b9 authored by damjan's avatar damjan
Browse files

[FEATURE] More descriptive error message

parent 7f6f76d8
No related branches found
No related tags found
No related merge requests found
......@@ -497,7 +497,8 @@ class TsrefRestService {
if (gettype($statusCode) === 'integer' && $statusCode >= 400) {
$outputObject = json_decode($outputJson);
$message = isset($outputObject->message) ? $outputObject->message : NULL;
throw new \RuntimeException($message, $statusCode);
$errors = isset($outputObject->errors) ? '. Errors:' . json_encode($outputObject->errors) : '';
throw new \RuntimeException($message . $errors, $statusCode);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment