refs #5122 Backend fix: Return error code for user exceptions
gitea/hedera-web/pipeline/head This commit looks good Details

This commit is contained in:
Juan Ferrer 2023-02-23 17:05:19 +01:00
parent 10d8128133
commit dd7185d5dd
3 changed files with 3 additions and 3 deletions

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
hedera-web (23.6.3) stable; urgency=low
hedera-web (23.6.4) stable; urgency=low
* Initial Release.

View File

@ -1,6 +1,6 @@
{
"name": "hedera-web",
"version": "23.6.3",
"version": "23.6.4",
"description": "Verdnatura web page",
"license": "GPL-3.0",
"repository": {

View File

@ -79,13 +79,13 @@ class JsonService extends RestService {
if (_ENABLE_DEBUG || $e instanceof Lib\UserException) {
$json->exception = get_class($e);
$json->message = $e->getMessage();
$json->code = $e->getCode();
} else {
$json->exception = 'Exception';
$json->message = s('Something went wrong');
}
if (_ENABLE_DEBUG) {
$json->code = $e->getCode();
$json->file = $e->getFile();
$json->line = $e->getLine();
$json->trace = $e->getTrace();